Function at 0x403570
Capabilities:
Check http status code
Connect to http server
Create http request
Delete file
Download and write a file
Get http content length
Read .ini file
Read and send data from client to server
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 0xffffffffffffffff
push 0x46ccac
mov eax, dword fs:[0]
push eax
sub esp, 0xae8
mov eax, dword [0x491830]
xor eax, esp
mov dword [esp + 0xae4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x491830]
xor eax, esp
push eax
lea eax, [esp + 0xafc]
mov dword fs:[0], eax
mov eax, dword [esp + 0xb0c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xb10]
xor ebp, ebp
mov dword [esp + 0x38], eax
cmp eax, ebp
jne 0x4035ce
xor eax, eax
jmp 0x403b25
push 0x206
lea edx, [esp + 0xee]
xor ecx, ecx
push ebp
push edx
mov edi, 0x50
mov dword [esp + 0x3c], ebp
mov word [esp + 0xf4], cx
call fcn.00451520
push 0x3fe
lea ecx, [esp + 0x70a]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x710], ax
call fcn.00451520
push 0x2f
push 0x478e96
call fcn.0044f0b8
mov esi, eax
add esp, 0x20
cmp esi, ebp
je 0x403653
mov edx, esi
sub edx, 0x478e96
sar edx, 1
inc edx
push edx
push 0x478e96
lea eax, [esp + 0xf0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add esi, 2
push esi
lea ecx, [esp + 0x6fc]
push ecx
jmp 0x403660
push 0x478e96
lea edx, [esp + 0xec]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0xe8]
push 0x3a
push eax
call fcn.0044f0b8
add esp, 8
cmp eax, ebp
je 0x403690
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.0044ee5d
add esp, 4
movzx edi, ax
push ebp
push ebp
push ebp
push ebp
push 0x478f34
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [esp + 0x44], ebx
cmp ebx, ebp
je 0x403b21
push ebp
push ebp
push 3
push ebp
push ebp
push edi
lea edx, [esp + 0x100]
push edx
push ebx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov esi, eax
mov dword [esp + 0x3c], esi
cmp esi, ebp
je 0x403b1a
push ebp
push SysReAllocString
push ebp
push ebp
push str.HTTP_1.1
lea eax, [esp + 0x70c]
push eax
push 0x478f50
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, ebp
je 0x403b13
mov eax, str.Accept_Language:_zh_cn__r_nContent_Type:_application_x_www_form_urlencoded_r_n
lea edx, [eax + 2]
mov ebx, 2
lea ecx, [ecx]
mov cx, word [eax]
add eax, ebx
cmp cx, bp
jne 0x403710
push ebp
sub eax, edx
push ebp
sar eax, 1
push eax
push str.Accept_Language:_zh_cn__r_nContent_Type:_application_x_www_form_urlencoded_r_n
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x403b04
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push ebp
xor eax, eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x50]
push edx
push 0x13
push edi
mov byte [esp + 0x5c], 0
mov dword [esp + 0x5d], eax
mov dword [esp + 0x61], eax
mov dword [esp + 0x65], eax
mov dword [esp + 0x69], eax
mov dword [esp + 0x6d], eax
mov dword [esp + 0x71], eax
mov dword [esp + 0x75], eax
mov word [esp + 0x79], ax
mov byte [esp + 0x7b], al
mov dword [esp + 0x2c], 0x20
call esi
test eax, eax
je 0x403b04
lea eax, [esp + 0x48]
push eax
call fcn.0044ee5d
add esp, 4
cmp eax, 0x194
je 0x403b04
push ebp
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x50]
push edx
push 0x20000005
push edi
call esi
test eax, eax
je 0x403b04
cmp dword [esp + 0x18], 4
jne 0x403b04
mov eax, dword [esp + 0x48]
push 0x1ff
lea ecx, [esp + 0x2f5]
push ebp
push ecx
mov dword [esp + 0x24], eax
mov byte [esp + 0x2fc], 0
call fcn.00451520
add esp, 0xc
mov dword [esp + 0x24], ebp
mov dword [esp + 0x1c], ebp
call fcn.00423066
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40380d
push 0x80004005
call fcn.00407090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
mov dword [esp + 0xb04], ebp
call fcn.00423066
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40383e
push 0x80004005
call fcn.00407090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 0x104
lea ecx, [esp + 0x4f4]
push ecx
push ebp
mov byte [esp + 0xb10], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x4f0]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
cmp cx, bp
jne 0x403874
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x4f4]
push edx
lea ecx, [esp + 0x1c]
call fcn.00406dd0
mov esi, dword [esp + 0x14]
push 0x5c
push esi
call fcn.0044e73b
add esp, 8
cmp eax, ebp
jne 0x4038ac
or eax, 0xffffffff
jmp 0x4038b0
sub eax, esi
sar eax, 1
inc eax
push eax
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x1c]
call fcn.00405af0
push str.ConfigZt58501.htm
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0xb10], bl
call fcn.00405c30
add esp, 0xc
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0xb08], 3
call fcn.004068d0
mov byte [esp + 0xb04], bl
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403913
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xb04], 1
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40393b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x2c]
push 0x478f7c
lea ecx, [esp + 0x20]
push esi
push ecx
call fcn.0044f8f6
add esp, 0xc
cmp dword [esp + 0x1c], ebp
jne 0x40396f
lea ecx, [esp + 0x14]
call fcn.004069b0
lea ecx, [esp + 0x2c]
call fcn.004069b0
jmp 0x403b04
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
mov edi, dword [sym.imp.WININET.dll_InternetSetFilePointer]
jmp 0x403980
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x24]
push edx
push 0x200
lea eax, [esp + 0x2f8]
push eax
push ecx
call ebx
test eax, eax
je 0x4039d6
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push edx
push 1
push eax
lea ecx, [esp + 0x2fc]
push ecx
call fcn.0044faab
add ebp, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
add esp, 0x10
push 0
push 0
push 0
push ebp
push edx
call edi
test eax, eax
je 0x4039d6
cmp dword [esp + 0x24], 0
jne 0x403980
mov eax, dword [esp + 0x1c]
push eax
call fcn.0044fba4
add esp, 4
cmp dword [esp + 0x18], ebp
jbe 0x403a00
lea ecx, [esp + 0x14]
call fcn.004069b0
lea ecx, [esp + 0x2c]
call fcn.004069b0
jmp 0x403b00
push str.Zt58501
lea ecx, [esp + 0x2c]
call fcn.00406f00
xor ecx, ecx
push 0x7e
push ecx
lea edx, [esp + 0x72]
push edx
mov word [esp + 0x74], cx
call fcn.00451520
mov ecx, dword [esp + 0x34]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
add esp, 0xc
push esi
push 0x40
lea eax, [esp + 0x70]
push eax
push 0x47927c
push ecx
push str.VerKey
call edi
mov edx, dword [esp + 0x34]
push esi
push 0x200
add edx, 0xb28
push edx
push 0x47927c
push str.UpdAddr
push str.VerKey
call edi
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x38]
push 0
push 0
push 0x40
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x7c]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403aa9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xb04], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x30], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403ad9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov dword [esp + 0xb04], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403b00
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x20]
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x44]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0xafc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xae4]
xor ecx, esp
call fcn.0044e3af
add esp, 0xaf4
ret 8