Function at 0x41d140
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
sub esp, 0xa58
mov eax, dword [0x491830]
xor eax, esp
mov dword [esp + 0xa54], eax
mov eax, dword [esi + 0x3e0]
push ebp
push edi
lea edi, [esi + 0x3e0]
sub eax, 0x10
cmp dword [eax + 0xc], 1
jle 0x41d176
mov eax, dword [eax + 4]
push eax
mov ecx, edi
call fcn.00406c50
mov edi, dword [edi]
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x5e]
push edx
mov ebp, 0x50
mov dword [esp + 0x1c], 0
mov word [esp + 0x60], cx
call fcn.00451520
xor eax, eax
push 0x3fe
push eax
lea ecx, [esp + 0x272]
push ecx
mov word [esp + 0x274], ax
call fcn.00451520
push str.5054399.com
push edi
call fcn.0044e5ee
add esp, 0x20
test eax, eax
jne 0x41d206
push str.4399.com
push edi
call fcn.0044e5ee
add esp, 8
test eax, eax
jne 0x41d206
push str.4399pk.com
push edi
call fcn.0044e5ee
add esp, 8
test eax, eax
jne 0x41d206
pop edi
pop ebp
mov ecx, dword [esp + 0xa54]
xor ecx, esp
call fcn.0044e3af
add esp, 0xa58
ret
push ebx
add edi, 0xe
push 0x2f
push edi
call fcn.0044f0b8
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x41d23d
mov edx, ebx
sub edx, edi
sar edx, 1
inc edx
push edx
push edi
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add ebx, 2
push ebx
lea ecx, [esp + 0x264]
push ecx
jmp 0x41d243
push edi
lea edx, [esp + 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x58]
push 0x3a
push eax
call fcn.0044f0b8
xor ebx, ebx
add esp, 8
cmp eax, ebx
je 0x41d272
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.0044ee5d
add esp, 4
movzx ebp, ax
push ebx
push ebx
push ebx
push ebx
push 0x478f34
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esi + 0x5f0], eax
cmp eax, ebx
je 0x41d512
push ebx
push ebx
push 3
push ebx
push ebx
push ebp
lea edx, [esp + 0x70]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esi + 0x5f4], eax
cmp eax, ebx
je 0x41d512
push ebx
push SysReAllocString
push ebx
push ebx
push str.HTTP_1.1
lea ecx, [esp + 0x274]
push ecx
push 0x478f50
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [esi + 0x5f8], eax
cmp eax, ebx
je 0x41d512
mov ecx, str.Accept_Language:_zh_cn__r_nContent_Type:_application_x_www_form_urlencoded_r_n
lea edi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x41d2e7
push ebx
sub ecx, edi
push ebx
sar ecx, 1
push ecx
push str.Accept_Language:_zh_cn__r_nContent_Type:_application_x_www_form_urlencoded_r_n
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x41d512
mov ecx, dword [esi + 0x5f8]
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
xor eax, eax
push ebx
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x21], eax
mov dword [esp + 0x25], eax
mov dword [esp + 0x29], eax
mov dword [esp + 0x2d], eax
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], eax
mov dword [esp + 0x39], eax
mov word [esp + 0x3d], ax
mov byte [esp + 0x3f], al
lea eax, [esp + 0x20]
push eax
push 0x13
push ecx
mov byte [esp + 0x2c], 0
mov dword [esp + 0x20], 0x20
call edi
test eax, eax
je 0x41d512
lea edx, [esp + 0x18]
push edx
call fcn.0044ee5d
add esp, 4
cmp eax, 0x194
je 0x41d512
mov edx, dword [esi + 0x5f8]
push ebx
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0x20000005
push edx
call edi
test eax, eax
je 0x41d512
cmp dword [esp + 0xc], 4
jne 0x41d512
mov eax, dword [esp + 0x18]
push 0x3ff
lea ecx, [esp + 0x665]
push ebx
push ecx
mov dword [esp + 0x18], eax
mov byte [esp + 0x66c], 0
call fcn.00451520
xor eax, eax
mov dword [esp + 0x46], eax
mov dword [esp + 0x4a], eax
mov dword [esp + 0x4e], eax
mov dword [esp + 0x52], eax
mov dword [esp + 0x56], eax
mov dword [esp + 0x5a], eax
mov dword [esp + 0x5e], eax
mov word [esp + 0x62], ax
push 0x478f7c
lea eax, [esi + 0x3e4]
mov dword [esp + 0x20], ebx
push eax
xor edx, edx
lea ebx, [esi + 0x5ec]
push ebx
xor edi, edi
mov word [esp + 0x50], dx
call fcn.0044f8f6
add esp, 0x18
cmp dword [ebx], edi
je 0x41d510
nop
mov eax, dword [esi + 0x5f8]
lea ecx, [esp + 0x10]
push ecx
push 0x400
lea edx, [esp + 0x668]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x41d4f7
mov ecx, dword [ebx]
mov edx, dword [esp + 0x10]
push ecx
push 1
push edx
lea eax, [esp + 0x66c]
push eax
call fcn.0044faab
add edi, dword [esp + 0x20]
xor edx, edx
mov eax, edi
imul eax, eax, 0x64
div dword [esp + 0x1c]
mov ecx, dword [esi + 0x620]
add esp, 0x10
push 0
mov ebp, eax
push ebp
push 0x402
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
push ebp
push 0x47cf38
lea edx, [esp + 0x40]
push 0x10
push edx
call fcn.0044e767
lea eax, [esp + 0x48]
add esp, 0x10
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x41d4a3
sub eax, ecx
sar eax, 1
push eax
lea eax, [esp + 0x3c]
push eax
lea ecx, [esi + 0x8d0]
call fcn.00406dd0
mov ecx, dword [esi + 0x89c]
push 1
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov edx, dword [esi + 0x5f8]
push 0
push 0
push 0
push edi
push edx
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
test eax, eax
je 0x41d4f7
cmp dword [esp + 0x10], 0
jne 0x41d420
mov eax, dword [ebx]
push eax
call fcn.0044fba4
add esp, 4
cmp dword [esp + 0xc], edi
ja 0x41d510
mov dword [esp + 0x14], 1
xor ebx, ebx
mov eax, dword [esi + 0x5f8]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp eax, ebx
je 0x41d525
push eax
call edi
mov eax, dword [esi + 0x5f4]
cmp eax, ebx
je 0x41d532
push eax
call edi
mov eax, dword [esi + 0x5f0]
cmp eax, ebx
je 0x41d53f
push eax
call edi
mov ecx, dword [esp + 0xa60]
mov eax, dword [esp + 0x14]
mov dword [esi + 0x5f8], ebx
mov dword [esi + 0x5f4], ebx
mov dword [esi + 0x5f0], ebx
pop ebx
pop edi
pop ebp
xor ecx, esp
call fcn.0044e3af
add esp, 0xa58
ret