Function at 0x402c10
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 0x45ee4c
mov eax, dword fs:[0]
push eax
sub esp, 0xae8
mov eax, dword [0x47c944]
xor eax, esp
mov dword [esp + 0xae4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47c944]
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 0x402c6e
xor eax, eax
jmp 0x4031c5
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.00447b40
push 0x3fe
lea ecx, [esp + 0x70a]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x710], ax
call fcn.00447b40
push 0x2f
push 0x46abae
call fcn.004460f0
mov esi, eax
add esp, 0x20
cmp esi, ebp
je 0x402cf3
mov edx, esi
sub edx, 0x46abae
sar edx, 1
inc edx
push edx
push 0x46abae
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 0x402d00
push 0x46abae
lea edx, [esp + 0xec]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0xe8]
push 0x3a
push eax
call fcn.004460f0
add esp, 8
cmp eax, ebp
je 0x402d30
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.00445d12
add esp, 4
movzx edi, ax
push ebp
push ebp
push ebp
push ebp
push 0x46ac44
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [esp + 0x44], ebx
cmp ebx, ebp
je 0x4031c1
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 0x4031ba
push ebp
push SysReAllocStringLen
push ebp
push ebp
push str.HTTP_1.1
lea eax, [esp + 0x70c]
push eax
push 0x46ac60
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, ebp
je 0x4031b3
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 0x402db0
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 0x4031a4
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 0x4031a4
lea eax, [esp + 0x48]
push eax
call fcn.00445d12
add esp, 4
cmp eax, 0x194
je 0x4031a4
push ebp
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x50]
push edx
push 0x20000005
push edi
call esi
test eax, eax
je 0x4031a4
cmp dword [esp + 0x18], 4
jne 0x4031a4
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.00447b40
add esp, 0xc
mov dword [esp + 0x24], ebp
mov dword [esp + 0x1c], ebp
call fcn.00419da5
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x402ead
push 0x80004005
call fcn.004045a0
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.00419da5
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x402ede
push 0x80004005
call fcn.004045a0
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 0x402f14
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x4f4]
push edx
lea ecx, [esp + 0x1c]
call fcn.004042e0
mov esi, dword [esp + 0x14]
push 0x5c
push esi
call fcn.00445593
add esp, 8
cmp eax, ebp
jne 0x402f4c
or eax, 0xffffffff
jmp 0x402f50
sub eax, esi
sar eax, 1
inc eax
push eax
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x1c]
call fcn.00403a30
push str.ConfigHjsg.htm
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0xb10], bl
call fcn.00403ab0
add esp, 0xc
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0xb08], 3
call fcn.00403e10
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 0x402fb3
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 0x402fdb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x2c]
push 0x46ac88
lea ecx, [esp + 0x20]
push esi
push ecx
call fcn.004461dc
add esp, 0xc
cmp dword [esp + 0x1c], ebp
jne 0x40300f
lea ecx, [esp + 0x14]
call fcn.00403ec0
lea ecx, [esp + 0x2c]
call fcn.00403ec0
jmp 0x4031a4
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
mov edi, dword [sym.imp.WININET.dll_InternetSetFilePointer]
jmp 0x403020
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 0x403076
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push edx
push 1
push eax
lea ecx, [esp + 0x2fc]
push ecx
call fcn.00446391
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 0x403076
cmp dword [esp + 0x24], 0
jne 0x403020
mov eax, dword [esp + 0x1c]
push eax
call fcn.0044648a
add esp, 4
cmp dword [esp + 0x18], ebp
jbe 0x4030a0
lea ecx, [esp + 0x14]
call fcn.00403ec0
lea ecx, [esp + 0x2c]
call fcn.00403ec0
jmp 0x4031a0
push 0x46a9e0
lea ecx, [esp + 0x2c]
call fcn.00404410
xor ecx, ecx
push 0x7e
push ecx
lea edx, [esp + 0x72]
push edx
mov word [esp + 0x74], cx
call fcn.00447b40
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 0x46adb4
push ecx
push str.VerKey
call edi
mov edx, dword [esp + 0x34]
push esi
push 0x200
add edx, 0x9b0
push edx
push 0x46adb4
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 0x403149
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 0x403179
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 0x4031a0
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.00445369
add esp, 0xaf4
ret 8