Function at 0x4012f0
Capabilities:
Connect to http server
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, eax
push esi
mov esi, dword [ebp + 0x10]
push edi
push 0xfa0
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xffffffff
mov dword [esi + 0x20], 0xffffffff
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x60], 0
mov ecx, dword [ebx + 4]
cmp ecx, 1
mov dword [esi + 0x2c], ecx
setne al
mov dword [esi + 8], 0
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], 0x3e5
mov dword [esi + 0x38], 0
mov eax, dword [ebx + 0x24]
mov dword [esi + 0x3c], eax
lea eax, [esi + 0x40]
push eax
mov dword [esi + 0x58], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
je 0x401503
push 0x1000
push 0
mov dword [esi + 0x58], 1
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 8], eax
test eax, eax
jne 0x4013c4
lea edi, [eax + 8]
jmp 0x40150f
mov ecx, dword [ebx + 0x1c]
xor edi, edi
cmp dword [ebx + 4], 2
mov eax, dword [ebx + 0x14]
mov edx, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], ecx
mov dword [ebp + 0x10], eax
jne 0x401446
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x401435
push edi
push pe_nt_image_headers32
push 4
push edi
push 1
push SysReAllocString
push eax
call edx
mov dword [esi + 0x14], eax
cmp eax, 0xffffffff
jne 0x40143d
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov edi, eax
test edi, edi
jne 0x40150f
cmp dword [esi + 0x2c], 2
jne 0x401492
mov eax, dword [esi + 0x14]
cmp eax, 0xffffffff
je 0x40148c
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x1c], eax
cmp eax, 0xffffffff
jne 0x401492
jmp 0x401503
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x18], eax
jmp 0x401446
mov ecx, dword [ebp - 4]
mov edx, dword [sym.imp.KERNEL32.dll_CreateFileW]
test ecx, ecx
je 0x401469
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0x40000000
push ecx
call edx
mov dword [esi + 0x20], eax
cmp eax, 0xffffffff
jne 0x401411
jmp 0x401400
push 0x1000
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 0x24], eax
test eax, eax
jne 0x401409
lea edi, [eax + 8]
jmp 0x40150f
mov eax, dword [ebx + 0x18]
mov dword [esi + 0x1c], eax
mov eax, dword [ebx + 0xc]
xor edi, edi
mov ebx, dword [ebx + 0x20]
mov dword [ebp + 0x10], eax
mov eax, ebx
push esi
push edi
neg eax
push 3
sbb eax, eax
push edi
and eax, 0x16b
push edi
add eax, 0x50
push eax
mov eax, dword [ebp + 0xc]
push dword [eax + 8]
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ecx, eax
mov dword [esi + 4], ecx
test ecx, ecx
je 0x401503
cmp dword [esi + 0x2c], 1
mov eax, 0x427528
je 0x4014da
mov eax, str.POST
neg ebx
push esi
sbb ebx, ebx
and ebx, 0x800000
add ebx, 0x84000000
push ebx
push 0
push 0
push 0
push dword [ebp + 0x10]
push eax
push ecx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [esi], eax
test eax, eax
jne 0x40150b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
je 0x401570
mov eax, dword [esi + 4]
mov dword [esi + 0x34], edi
test eax, eax
je 0x40152b
push 0
push eax
call dword [sym.imp.WININET.dll_InternetSetStatusCallbackW]
push dword [esi + 4]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esi + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x40153c
push eax
call ebx
mov eax, dword [esi + 0x20]
cmp eax, 0xffffffff
je 0x401579
push eax
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esi + 0x58], 0
je 0x40155d
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov esi, dword [esi + 8]
test esi, esi
je 0x401570
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
push eax
call ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [esi + 0x24]
test ebx, ebx
je 0x401547
cmp dword [esi + 0x34], 0
je 0x401547
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push eax
call ebx
mov dword [esi + 0x24], 0
jmp 0x40154d