Function at 0x402d1b
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Download url
Get file size
Get http content length
Parse url
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
mov ebp, esp
push 0xffffffffffffffff
push 0x440f68
push 0x41cb28
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ecx
mov eax, 0x3df8
call fcn.0041c8d0
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x2c], esi
or dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x20], esi
call fcn.004181b2
mov dword [ebp - 0x5c], eax
mov dword [ebp - 4], esi
push 0x43644c
mov ebx, dword [ebp + 0xc]
push ebx
call fcn.0041ca90
pop ecx
pop ecx
test eax, eax
je 0x402d8c
push esi
push esi
push dword [ebp + 0x10]
push ebx
push esi
call sub.urlmon.dll_URLDownloadToFileA
mov dword [ebp - 0x20], esi
jmp 0x403401
mov edi, 0x400
push edi
lea eax, [ebp - 0x670]
push eax
call fcn.0040e4f9
pop ecx
pop ecx
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x670]
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x48], eax
cmp eax, esi
jne 0x402dc4
mov dword [ebp - 0x20], 0x80004005
jmp 0x403401
push 0x3c
push esi
lea eax, [ebp - 0xb4]
push eax
call fcn.0041bdb0
add esp, 0xc
mov dword [ebp - 0xb4], 0x3c
lea eax, [ebp - 0x1e70]
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa0], edi
xor eax, eax
mov word [ebp - 0x9c], ax
lea eax, [ebp - 0x1a70]
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edi
lea eax, [ebp - 0x670]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], edi
lea eax, [ebp - 0xb4]
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
push esi
push esi
push 3
push 0x435f6a
push 0x435f6b
push dword [ebp - 0x9c]
push dword [ebp - 0xa4]
push dword [ebp - 0x48]
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x40], eax
cmp eax, esi
je 0x402db8
lea eax, [ebp - 0x1670]
cmp dword [ebp - 0x84], esi
je 0x402e74
push dword [ebp - 0x88]
jmp 0x402e79
push 0x436454
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [ebp - 0x7c], esi
je 0x402e95
push dword [ebp - 0x80]
lea eax, [ebp - 0x1670]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x1670]
push eax
push esi
call fcn.00411525
pop ecx
pop ecx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], 0x3c
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x34], esi
push esi
push 0x4400000
push esi
push 0x435f72
push 0x436458
lea eax, [ebp - 0x1670]
push eax
push 0x436464
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ebx, eax
mov dword [ebp - 0x2c], ebx
cmp ebx, esi
je 0x402db8
push esi
push 0x20
push 4
push esi
push esi
push 0x40000000
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x1c], edi
cmp edi, 0xffffffff
je 0x402db8
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0x14], esi
jne 0x402f1d
mov dword [ebp + 0xc], esi
mov dword [ebp - 0x60], esi
cmp dword [ebp + 0xc], esi
je 0x402fb3
cmp dword [ebp + 0xc], 0xffffffff
je 0x402fb3
lea eax, [ebp - 0x78]
push eax
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x402fb3
lea eax, [ebp - 0xec]
push eax
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
push 0x1e
lea eax, [ebp - 0x10c]
push eax
push esi
lea eax, [ebp - 0xec]
push eax
call dword [sym.imp.WININET.dll_InternetTimeFromSystemTime]
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 0xc]
push str.Range:_bytes_d__r_nIf_Range:__s_r_n
lea eax, [ebp - 0x170]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0xa0000000
lea eax, [ebp - 0x170]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x170]
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x24], 1
push esi
push esi
push esi
push esi
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x40301d
cmp dword [ebp - 0x24], esi
je 0x402db8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
sub ecx, 0x2ee2
je 0x40300a
sub ecx, 5
je 0x40300a
sub ecx, 0x16
je 0x40300a
mov dword [ebp - 0x24], esi
push esi
push 7
push eax
push ebx
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
cmp eax, 0x2f00
jne 0x402fba
jmp 0x402fb3
mov dword [ebp - 0x24], esi
push esi
push esi
push eax
xor eax, eax
push eax
call fcn.0040d486
add esp, 0x10
jmp 0x402fba
cmp dword [ebp - 0x24], esi
je 0x402db8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x4c], 4
push esi
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x30]
push eax
push 0x20000013
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x403059
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x30]
cmp eax, 0x197
je 0x403071
cmp eax, 0x191
jne 0x4030bd
cmp dword [ebp - 0x24], esi
je 0x4030bd
push esi
push 7
push edi
push ebx
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
cmp eax, 0x2f00
je 0x403094
mov dword [ebp - 0x24], esi
jmp 0x403060
push esi
push esi
push esi
push esi
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
mov dword [ebp - 0x4c], 4
push esi
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x30]
push eax
push 0x20000013
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
jmp 0x403060
cmp eax, 0xc8
je 0x403202
cmp eax, 0xce
je 0x403202
lea ecx, [eax - 0x190]
cmp ecx, 0xc7
ja 0x4031e8
cmp eax, 0x193
jne 0x40313a
mov dword [ebp - 0x6c], 0xf
push esi
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0xcc]
push eax
push 0x14
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40312e
push str.Export_Denied
lea eax, [ebp - 0xcc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x40312e
push esi
push esi
push 0x258
jmp 0x4031be
push esi
push esi
push 0x193
jmp 0x4031be
cmp eax, 0x1f4
jne 0x40315b
xor edi, edi
inc edi
push edi
push esi
push eax
xor eax, eax
push eax
call fcn.0040d486
add esp, 0x10
test eax, eax
je 0x4031c9
mov dword [ebp - 0x34], edi
jmp 0x4031c9
cmp eax, 0x1f7
jne 0x4031b7
cmp dword [ebp - 0x44], 5
jge 0x403196
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], esi
jl 0x403183
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
dec dword [ebp - 0x58]
jmp 0x40316e
inc dword [ebp - 0x44]
add dword [ebp - 0x38], 0x1e
mov dword [ebp - 0x34], 1
jmp 0x402eb1
xor edi, edi
inc edi
push edi
push esi
push 0x1f7
xor eax, eax
push eax
call fcn.0040d486
add esp, 0x10
test eax, eax
je 0x4031c9
mov dword [ebp - 0x34], edi
jmp 0x402ea7
push esi
push esi
push 0x1f4
xor eax, eax
push eax
call fcn.0040d486
add esp, 0x10
xor eax, eax
cmp dword [ebp - 0x30], 0x194
setne al
dec eax
and eax, 0x6c1fd
add eax, 0x80004005
mov dword [ebp - 0x20], eax
jmp 0x4033d7
push esi
push esi
push eax
xor eax, eax
push eax
call fcn.0040d486
add esp, 0x10
mov dword [ebp - 0x20], 0x80004005
jmp 0x4033d7
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x70], 4
push esi
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x3c]
push eax
push 0x20000005
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
mov eax, dword [ebp - 0x3c]
cmp eax, esi
ja 0x403234
mov dword [ebp - 0x3c], 0xe4e1c0
jmp 0x4032e4
cmp dword [ebp - 0x60], esi
je 0x4032e4
cmp dword [ebp + 0xc], esi
je 0x4032e4
cmp eax, dword [ebp + 0xc]
jne 0x4032e4
mov edi, 0x100
mov dword [ebp - 0x50], edi
push esi
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x270]
push eax
push 0x35
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x4032e4
mov dword [ebp - 0x50], edi
push esi
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x270]
push eax
push 0xb
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
push esi
test eax, eax
je 0x4032d0
lea eax, [ebp - 0xdc]
push eax
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.WININET.dll_InternetTimeToSystemTime]
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0xdc]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 1
jne 0x4032e4
jmp 0x402d84
push esi
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebx, 0x1fa0
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x64], esi
cmp dword [ebp - 0x30], 0xce
jne 0x40330a
push 2
push esi
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40331f
push esi
push esi
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edi, dword [ebp + 8]
add edi, 8
mov eax, dword [edi]
push edi
call dword [eax + 0x28]
test eax, eax
je 0x4033c7
push esi
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4033c7
mov eax, dword [edi]
push edi
call dword [eax + 0x24]
test eax, eax
jne 0x40335c
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4033bc
mov dword [ebp - 0x28], esi
lea eax, [ebp - 0x28]
push eax
push ebx
lea eax, [ebp - 0x3e10]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x402db8
cmp dword [ebp - 0x28], esi
je 0x40339c
mov dword [ebp - 0x68], esi
push esi
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x28]
lea eax, [ebp - 0x3e10]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x28]
add dword [ebp - 0x54], eax
cmp dword [ebp + 0x18], esi
je 0x4033bc
mov ecx, dword [edi]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp + 0xc]
add edx, eax
push edx
mov edx, dword [ebp - 0x54]
add edx, eax
push edx
push edi
call dword [ecx + 0x2c]
cmp dword [ebp - 0x28], esi
jne 0x40331f
jmp 0x4033ce
mov dword [ebp - 0x64], 1
cmp dword [ebp - 0x64], esi
jne 0x402db8
cmp dword [ebp - 0x2c], esi
je 0x4033e5
push dword [ebp - 0x2c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x1c], 0xffffffff
je 0x4033f8
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x1c], 0xffffffff
cmp dword [ebp - 0x34], esi
jne 0x402eb1
or dword [ebp - 4], 0xffffffff
call fcn.00403420
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0x14