Function at 0x402390
Capabilities:
Check if file exists
Connect to http server
Create directory
Create http request
Download and write a file
Get file attributes
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x105c]
mov eax, 0x105c
call fcn.0044b3a0
push 0xffffffffffffffff
push 0x45de40
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x476110]
xor eax, ebp
mov dword [ebp + 0x1058], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x1064]
mov ebx, edx
mov edi, ecx
mov dword [ebp - 4], 0
cmp dword [ebx + 0x14], 0
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x11], 0
jne 0x402406
push 0x4714b4
lea ecx, [ebp - 0x48]
push ecx
mov dword [ebp - 0x48], 0x46b440
call fcn.0044812b
mov esi, edi
call fcn.00402ce0
push 0
push 0
push 0
push 0
push str.Http_connect
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [edi + 0x90], eax
test eax, eax
jne 0x40243f
push 0x4714b4
lea edx, [ebp - 0x34]
push edx
mov dword [ebp - 0x34], 0x46b220
call fcn.0044812b
push ebx
push edi
call fcn.00402100
mov esi, 8
cmp dword [edi + 0x38], esi
jb 0x402455
mov eax, dword [edi + 0x24]
jmp 0x402458
lea eax, [edi + 0x24]
push 0
push 0
push 3
push 0
push 0
push 0x50
push eax
mov eax, dword [edi + 0x90]
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [edi + 0x94], eax
test eax, eax
jne 0x402491
push 0x4714b4
lea ecx, [ebp - 0x3c]
push ecx
mov dword [ebp - 0x3c], 0x46b238
call fcn.0044812b
cmp dword [edi + 0x70], esi
jb 0x40249b
mov ecx, dword [edi + 0x5c]
jmp 0x40249e
lea ecx, [edi + 0x5c]
push 0
push SysReAllocString
push 0
push 0
push str.HTTP_1.1
push ecx
push 0x46b2b0
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [edi + 0x98], eax
test eax, eax
jne 0x4024da
push 0x4714b4
lea edx, [ebp - 0x44]
push edx
mov dword [ebp - 0x44], 0x46b264
call fcn.0044812b
xor eax, eax
mov dword [ebp + 0x50], 7
mov dword [ebp + 0x4c], 0
mov word [ebp + 0x3c], ax
push edi
lea eax, [ebp + 0x38]
mov byte [ebp - 4], 1
call fcn.00402310
mov eax, dword [ebp + 0x3c]
cmp dword [ebp + 0x50], esi
jae 0x402506
lea eax, [ebp + 0x3c]
mov ecx, dword [ebp + 0x4c]
mov edx, dword [edi + 0x98]
push 0
push 0
push ecx
push eax
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x402535
push 0x4714b4
lea eax, [ebp - 0x4c]
push eax
mov dword [ebp - 0x4c], 0x46b27c
call fcn.0044812b
mov ebx, 0x1000
push ebx
lea ecx, [ebp + 0x55]
push 0
push ecx
mov byte [ebp + 0x54], 0
call fcn.0044a250
mov ecx, dword [edi + 0x98]
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
add esp, 0xc
push 0
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp + 0x54]
push eax
push 0x15
push ecx
mov dword [ebp - 0x18], ebx
call esi
test eax, eax
jne 0x402584
push 0x4714b4
lea edx, [ebp - 0x38]
push edx
mov dword [ebp - 0x38], 0x46b294
call fcn.0044812b
lea eax, [ebp + 0x54]
push eax
lea ecx, [ebp]
call fcn.00403240
lea ecx, [ebp]
push ecx
mov edx, 0x46b2ac
mov byte [ebp - 4], 2
call fcn.00402770
cmp eax, 0xffffffff
je 0x4025bc
push 0x4714b4
lea edx, [ebp - 0x28]
push edx
mov dword [ebp - 0x28], 0x46b450
call fcn.0044812b
mov edx, dword [edi + 0x98]
push 0
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp + 0x54]
push ecx
push 5
push edx
mov dword [ebp - 0x18], ebx
call esi
test eax, eax
jne 0x4025ed
push 0x4714b4
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], 0x46b294
call fcn.0044812b
mov ecx, dword [ebp - 0x18]
lea edx, [ebp + 0x54]
push edx
mov byte [ebp + ecx + 0x54], 0
call fcn.00446f3d
add esp, 4
mov dword [ebp - 0x20], eax
xor ebx, ebx
mov esi, dword [ebp - 0x30]
push ebx
push esi
mov edx, 0x46b464
call fcn.004027f0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402664
push esi
mov ecx, ebx
xor edx, edx
lea esi, [ebp + 0x1c]
call fcn.00402820
mov eax, dword [ebp + 0x20]
mov esi, 8
cmp dword [ebp + 0x34], esi
jae 0x402639
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402659
mov eax, dword [ebp + 0x20]
cmp dword [ebp + 0x34], esi
jae 0x402650
lea eax, [ebp + 0x20]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea esi, [ebp + 0x1c]
inc ebx
call fcn.004019b0
jmp 0x402606
cmp dword [esi + 0x18], 8
jb 0x40266f
mov esi, dword [esi + 4]
jmp 0x402672
add esi, 4
push 0x46b1d4
push esi
call fcn.004469de
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40269b
push 0x4714b4
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x40], 0x46b468
call fcn.0044812b
xor esi, esi
lea ecx, [ecx]
mov eax, dword [edi + 0x98]
lea ecx, [ebp - 0x18]
push ecx
push 0x1000
lea edx, [ebp + 0x54]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4026fa
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4026fa
push ebx
push 1
push eax
lea ecx, [ebp + 0x54]
push ecx
mov byte [ebp + eax + 0x54], 0
call fcn.00446b57
mov eax, dword [edi + 0x9c]
add esi, dword [ebp - 0x18]
add esp, 0x10
test eax, eax
je 0x4026a0
mov edx, dword [edi + 0xa0]
push 0
push esi
push edx
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x4026a0
push ebx
call fcn.00446c50
add esp, 4
cmp dword [ebp - 0x20], esi
je 0x40271d
push 0x4714b4
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], 0x46b48c
call fcn.0044812b
lea ecx, [ebp]
mov bl, 1
call fcn.00402d30
lea esi, [ebp + 0x38]
call fcn.004019b0
jmp 0x402742
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1058]
xor ecx, ebp
call fcn.00446830
add ebp, 0x105c
mov esp, ebp
pop ebp
ret 4