Function at 0x401ea0
Capabilities:
Check http status code
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
mov eax, 0x4250
call fcn.00477c10
mov eax, dword [0x4b0650]
xor eax, esp
mov dword [esp + 0x424c], eax
mov eax, dword [0x4af068]
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
mov esi, ecx
lea ecx, [esp + 0x24]
push ecx
push 0x49
add eax, 1
xor ebp, ebp
push ebp
mov dword [esp + 0x30], eax
call edi
push 4
lea edx, [esp + 0x24]
push edx
push 0x4a
push ebp
call edi
push 4
lea eax, [esp + 0x24]
push eax
push 0x67
push ebp
call edi
push ebp
push 0x80
push 3
push ebp
push 3
push 0xc0000000
lea ecx, [esi + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x1c]
mov ebx, eax
mov eax, dword [esi + 0x18]
add eax, dword [edx]
push ebp
adc ecx, dword [edx + 4]
push ebp
push ecx
push eax
push ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x401f9a
push 0x206
lea edx, [esp + 0x5a]
push ebp
push edx
mov word [esp + 0x60], bp
call fcn.00477c40
mov eax, dword [esi + 0xc]
push eax
push str._Part:_d__SetFilePointer_fails
lea ecx, [esp + 0x68]
push 0x104
push ecx
call fcn.00477bdc
lea edx, [esp + 0x70]
push edx
call fcn.0040de80
lea eax, [esp + 0x74]
push eax
call fcn.00401030
mov eax, dword [esi + 0x2c]
add esp, 0x24
cmp eax, ebp
je 0x4024b2
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0xc]
push ecx
push ebp
push edx
push 0x479
call eax
add esp, 0x10
jmp 0x4024b2
mov ecx, dword [esp + 0x426c]
mov edx, dword [esp + 0x4268]
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x4270]
push eax
mov eax, dword [esp + 0x4268]
push ecx
push edx
push eax
mov ecx, esi
mov dword [esp + 0x3c], 0x28
mov dword [esp + 0x58], ebp
call fcn.00401d80
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x10], edi
jl 0x4024b7
mov ecx, dword [esi + 0xc]
push ecx
push str._Part:_d_HttpSendRequestExW_begin
call fcn.0040de80
mov eax, dword [esi + 0x3c]
add esp, 8
push esi
push 8
push ebp
lea edx, [esp + 0x38]
push edx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestExW]
test eax, eax
jne 0x40209f
lea ecx, [esp + 0x10]
push 0x4930ac
push ecx
call fcn.004012f0
push 0x206
lea edx, [esp + 0x62]
push ebp
push edx
mov word [esp + 0x68], bp
call fcn.00477c40
mov edi, dword [esp + 0x24]
mov eax, dword [esi + 0xc]
push edi
push eax
push str._Part:_d_HttpSendRequestExW_Error__hr___.8X
lea ecx, [esp + 0x74]
push 0x104
push ecx
call fcn.00477bdc
lea edx, [esp + 0x7c]
push edx
call fcn.00401030
mov eax, dword [esi + 0x2c]
add esp, 0x2c
cmp eax, ebp
je 0x4024b7
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0xc]
push ecx
push 2
push edx
push 0x479
call eax
add esp, 0x10
jmp 0x4024b7
mov eax, dword [esi + 0xc]
push eax
push str._Part:_d_HttpSendRequestExW_completed
call fcn.0040de80
mov ecx, dword [esi + 0x3c]
add esp, 8
push esi
push ebp
push ebp
push ecx
call dword [sym.imp.WININET.dll_HttpEndRequestW]
test eax, eax
jne 0x40210c
lea edx, [esp + 0x10]
push 0x492fdc
push edx
call fcn.004012f0
push 0x206
lea eax, [esp + 0x62]
push ebp
push eax
mov word [esp + 0x68], bp
call fcn.00477c40
mov edi, dword [esp + 0x24]
mov ecx, dword [esi + 0xc]
push edi
push ecx
push str._Part:_d_HttpEndRequestW_Error__hr___.8X
lea edx, [esp + 0x74]
push 0x104
push edx
call fcn.00477bdc
lea eax, [esp + 0x7c]
push eax
jmp 0x402073
mov eax, dword [esi + 0x2c]
cmp eax, ebp
je 0x402127
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0xc]
push ecx
push 1
push edx
push 0x479
call eax
add esp, 0x10
mov eax, dword [esi + 8]
mov ebp, dword [esi + 0x10]
push 0
push eax
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
neg edi
sbb edi, edi
and edi, 0x7fffbffc
add edi, 0x80004004
cmp edi, 0x80004004
je 0x402311
mov eax, ebp
shl eax, 0xa
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x18]
push ecx
push eax
mov eax, dword [esi + 0x3c]
lea edx, [esp + 0x264]
push edx
push eax
mov dword [esp + 0x28], 0
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ebp, eax
test ebp, ebp
je 0x402229
mov eax, dword [esp + 0x18]
test eax, eax
jbe 0x40233f
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x268]
push edx
push ebx
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x1c]
mov edi, eax
mov eax, dword [esi + 0x28]
add dword [eax], ecx
adc dword [eax + 4], 0
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x2c]
push edx
push 0
push eax
push 0x473
call ecx
add esp, 0x10
test edi, edi
je 0x40231e
mov edx, dword [esp + 0x1c]
cmp edx, dword [esp + 0x18]
jb 0x40231e
mov eax, dword [esi + 8]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
neg edi
sbb edi, edi
and edi, 0x7fffbffc
add edi, 0x80004004
cmp edi, 0x80004004
je 0x4024b7
mov eax, dword [esp + 0x10]
jmp 0x402165
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov edi, eax
jle 0x402241
and edi, 0xffff
or edi, 0x80070000
push edi
push eax
push 0x492f60
push 0x4927e4
call fcn.0040de80
add esp, 0x10
cmp byte [esi + 0x450], 0
jne 0x4022d3
mov ecx, dword [esi + 8]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4022d3
mov eax, dword [esi + 0x28]
mov dword [eax], 0
mov dword [eax + 4], 0
cmp dword [esi + 0x2c], 0
je 0x4022d3
push 0x2000
call fcn.00477742
mov edx, dword [esp + 0x4274]
mov ecx, dword [esp + 0x426c]
push edx
mov edx, dword [esp + 0x426c]
mov ebp, eax
mov eax, dword [esp + 0x4274]
push eax
push ecx
push edx
push str.No_content_to_read__i64From___i64d__i64To___i64d
push 0x1000
push ebp
call fcn.00477bdc
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x2c]
push eax
push ebp
push edi
push 0x475
call ecx
add esp, 0x30
push 0x206
lea edx, [esp + 0x5a]
push 0
push edx
mov word [esp + 0x60], 0
call fcn.00477c40
mov eax, dword [esi + 0xc]
push edi
push eax
push str._Part:_d_InternetReadFile_Error_:__hr___.8X
lea ecx, [esp + 0x6c]
push 0x104
push ecx
call fcn.00477bdc
lea edx, [esp + 0x74]
push edx
call fcn.00401030
add esp, 0x24
test edi, edi
jl 0x4024b7
jmp 0x4024b2
push str._Part:_d_fwrite_met_some_error
call fcn.0040de80
add esp, 4
push ebx
mov edi, 0x80700006
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or ebx, 0xffffffff
jmp 0x4024b7
mov eax, dword [esi + 0x28]
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov eax, dword [esi + 0xc]
push ecx
push edx
push eax
push str._Part:_d_No_content_to_read__m_pi64BytesWritten___I64d
call fcn.0040de80
mov eax, dword [esp + 0x427c]
mov edx, dword [esi + 0x28]
mov ecx, dword [esp + 0x4280]
mov ebx, dword [edx]
add esp, 0x10
sub eax, dword [esp + 0x4264]
sbb ecx, dword [esp + 0x4268]
cmp ebx, eax
jne 0x4023ec
mov eax, dword [edx + 4]
cmp eax, ecx
jne 0x4023ec
cmp ebp, 1
mov dword [esp + 0x10], 0
jne 0x4024ae
cmp dword [esp + 0x18], 0
jne 0x4024ae
mov edx, dword [esi + 0x3c]
push 0
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0x20000013
push edx
mov dword [esp + 0x3c], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x402450
lea eax, [esp + 0x10]
push str._Part:_d_HttpQueryInfo
push eax
call fcn.004012f0
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
add esp, 8
jmp 0x4024b7
cmp byte [esi + 0x450], 0
jne 0x402445
mov dword [edx], 0
mov dword [edx + 4], 0
cmp dword [esi + 0x2c], 0
je 0x402445
push 0x2000
call fcn.00477742
mov ebp, eax
mov eax, dword [esi + 0x28]
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov eax, dword [esi + 0xc]
push ecx
push edx
push eax
push str._Part:_d_No_content_to_read__m_pi64BytesWritten___I64d
push 0x1000
push ebp
call fcn.00477bdc
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0x2c]
push ecx
push ebp
push edi
push 0x475
call edx
add esp, 0x2c
mov ebx, dword [esp + 0x14]
mov edi, 0x80700006
jmp 0x4024b7
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x4270]
mov eax, dword [esp + 0x426c]
push ecx
mov ecx, dword [esp + 0x426c]
push edx
mov edx, dword [esp + 0x426c]
push eax
mov eax, dword [esi + 0xc]
push ecx
push edx
push eax
push str._Part:_d_ProcessSubPart_for___I64d____I64d___dwInfo___d
call fcn.0040de80
mov edi, dword [esp + 0x40]
add esp, 0x1c
cmp edi, 0xce
je 0x4024a6
cmp edi, 0xc8
je 0x4024a6
mov ebx, dword [esp + 0x14]
add edi, 0x80800000
jmp 0x4024b7
mov ebx, dword [esp + 0x14]
xor edi, edi
jmp 0x4024b7
mov ebx, dword [esp + 0x14]
mov edi, 0x8000ffff
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x4024d2
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0xc]
push ecx
push 0
push edx
push 0x473
call eax
add esp, 0x10
cmp ebx, 0xffffffff
je 0x4024de
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x4024ff
push 0
push eax
call dword [sym.imp.WININET.dll_InternetSetStatusCallbackW]
mov eax, dword [esi + 0x3c]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 0x3c], 0
mov ecx, dword [esp + 0x4270]
mov edx, dword [esp + 0x426c]
mov eax, dword [esp + 0x4268]
push ecx
mov ecx, dword [esp + 0x4268]
push edx
mov edx, dword [esi + 0xc]
push eax
push ecx
push edx
push str._Part:_d_ProcessSubPart_for___I64d____I64d__end
call fcn.0040de80
mov eax, dword [esi + 8]
add esp, 0x18
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
mov eax, 0x80004004
je 0x402547
mov eax, edi
mov ecx, dword [esp + 0x425c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00477bf8
add esp, 0x4250
ret 0x10