Function at 0x401f00
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Resolve function by parsing pe exports
Set http header

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
xor ebp, ebp
push edi
mov eax, dword [esi]
mov dword [esp + 0x14], ebp
cmp eax, ebp
mov dword [esp + 0x10], ebp
jne 0x401f6a
mov eax, dword [esi + 0x8c]
cmp eax, ebp
jne 0x401f29
xor edx, edx
jmp 0x401f38
mov edx, dword [esi + 0x88]
cmp edx, ebp
jne 0x401f38
mov edx, 0x439698
mov ecx, dword [esi + 0x10]
cmp ecx, ebp
jne 0x401f44
mov ecx, 0x439698
neg eax
sbb eax, eax
push ebp
and eax, 2
push ebp
inc eax
push edx
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
cmp eax, ebp
mov dword [esi], eax
jne 0x401f6a
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 8
ret
mov ecx, dword [esi]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
lea eax, [esp + 0x1c]
push 4
push eax
push 3
push ecx
mov dword [esp + 0x2c], 0x1388
call edi
mov eax, dword [esi]
lea edx, [esp + 0x1c]
push 4
push edx
push 7
push eax
call edi
mov edx, dword [esi]
lea ecx, [esp + 0x1c]
push 4
push ecx
push 6
push edx
call edi
mov ecx, dword [esi]
lea eax, [esp + 0x1c]
push 4
push eax
push 5
push ecx
call edi
mov eax, dword [esi + 8]
cmp eax, ebp
je 0x40200c
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push 0x44b910
lea ebx, [esi + 0x2c]
call fcn.0040d6da
add esp, 4
mov edi, eax
mov ecx, ebx
push 1
push edi
call fcn.00402b30
test al, al
je 0x402009
mov eax, dword [ebx + 4]
cmp edi, ebp
mov ecx, 0x44b910
jbe 0x401ffb
mov edx, edi
mov bp, word [ecx]
add ecx, 2
mov word [eax], bp
add eax, 2
dec edx
jne 0x401fec
mov edx, dword [ebx + 4]
mov dword [ebx + 8], edi
xor ebp, ebp
mov word [edx + edi*2], 0
mov dword [esi + 8], ebp
mov eax, dword [esi + 4]
mov ebp, dword [esp + 0x30]
test eax, eax
je 0x4020e5
mov eax, dword [esi + 0x20]
lea edi, [esi + 0x1c]
test eax, eax
jne 0x40202a
mov eax, 0x439698
mov ecx, dword [esp + 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x402043
cmp dword [esi + 0x68], ebp
je 0x4020e5
mov edx, dword [esi + 4]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push 0x44b910
mov dword [esi + 4], 0
call fcn.0040d6da
add esp, 4
mov ecx, edi
mov ebx, eax
call fcn.00402c60
cmp eax, ebx
jae 0x402073
call fcn.004177c8
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x402098
mov al, byte [ecx - 1]
test al, al
je 0x402098
cmp al, 0xff
je 0x402098
test ebx, ebx
jne 0x4020bc
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, edi
call fcn.00402d80
jmp 0x4020de
test ebx, ebx
jne 0x4020a7
push 1
mov ecx, edi
call fcn.00402d80
jmp 0x4020de
mov eax, dword [edi + 0xc]
cmp eax, 0x1f
ja 0x4020b3
cmp eax, ebx
jae 0x4020c4
push 1
mov ecx, edi
call fcn.00402d80
push ebx
mov ecx, edi
call fcn.00402c70
mov eax, dword [edi + 4]
push ebx
push 0x44b910
push eax
call fcn.00401cf0
add esp, 0xc
mov ecx, edi
push ebx
call fcn.00402b10
mov dword [esi + 0x68], 0
mov eax, dword [esi + 4]
test eax, eax
jne 0x4021a5
mov ecx, dword [esp + 0x20]
mov edx, dword [esi]
push 0
push ebp
push ecx
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
test eax, eax
mov dword [esi + 4], eax
jne 0x402115
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0x20]
mov dword [esi + 0x68], ebp
push eax
lea edi, [esi + 0x1c]
call fcn.0040d6da
add esp, 4
mov ecx, edi
mov ebx, eax
call fcn.00402c60
cmp eax, ebx
jae 0x40213a
call fcn.004177c8
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x40215f
mov al, byte [ecx - 1]
test al, al
je 0x40215f
cmp al, 0xff
je 0x40215f
test ebx, ebx
jne 0x402183
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, edi
call fcn.00402d80
jmp 0x4021a5
test ebx, ebx
jne 0x40216e
push 1
mov ecx, edi
call fcn.00402d80
jmp 0x4021a5
mov eax, dword [edi + 0xc]
cmp eax, 0x1f
ja 0x40217a
cmp eax, ebx
jae 0x40218b
push 1
mov ecx, edi
call fcn.00402d80
push ebx
mov ecx, edi
call fcn.00402c70
mov ecx, dword [esp + 0x20]
mov edx, dword [edi + 4]
push ebx
push ecx
push edx
call fcn.00401cf0
add esp, 0xc
mov ecx, edi
push ebx
call fcn.00402b10
mov ebx, dword [esp + 0x2c]
mov eax, str.POST
test ebx, ebx
jne 0x4021b7
mov eax, 0x4473fc
mov edx, dword [esp + 0x34]
mov ecx, ebx
neg ecx
sbb ecx, ecx
and cl, 0
add ecx, 0x100
neg edx
sbb edx, edx
and edx, 0x800000
or ecx, edx
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x2c]
push 0x447138
push ecx
push 0
push edx
push eax
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
test eax, eax
mov dword [esi + 8], eax
jne 0x402207
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 8
ret
mov ecx, dword [esi + 0x74]
test ecx, ecx
je 0x40223c
cmp ecx, 1
jne 0x40221a
mov ecx, str.Accept_Language:_zh_cn
jmp 0x402241
cmp ecx, 2
jne 0x402226
mov ecx, str.Accept_Language:_ko
jmp 0x402241
cmp ecx, 3
jne 0x402232
mov ecx, str.Accept_Language:_ja
jmp 0x402241
cmp ecx, 4
mov ecx, str.Accept_Language:_zh_tw
je 0x402241
mov ecx, str.Accept_Language:_en
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
push 0x20000000
push 0xffffffffffffffff
push ecx
push eax
call edi
mov eax, dword [esi + 0x78]
test eax, eax
jne 0x40226f
test ebx, ebx
je 0x402298
mov ecx, dword [esi + 8]
push 0x20000000
push 0xffffffffffffffff
push str.Content_Type:_application_x_www_form_urlencoded
push ecx
jmp 0x402296
cmp eax, 1
jne 0x402298
mov edx, dword [esi + 8]
push 0x20000000
push 0xffffffffffffffff
push str.Content_Type:_application_json__charsetutf_8
push edx
call edi
mov eax, dword [esi + 8]
push 0x20000000
push 0xffffffffffffffff
push str.x_requested_with:_XMLHttpRequest
push eax
call edi
mov eax, dword [esi + 0x60]
mov dword [esi + 0x78], 0
test eax, eax
jne 0x4022c1
mov edx, dword [esi + 8]
lea ecx, [esp + 0x20]
push 4
push ecx
push 0x3f
push edx
mov dword [esp + 0x30], 2
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test ebx, ebx
je 0x4022d4
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
jmp 0x4022d8
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x20], 0
xor ebp, ebp
push str.send_request_n
call fcn.0040d6f7
mov ecx, dword [esp + 0x30]
mov edx, dword [esi + 8]
add esp, 4
push 0
push ebx
push ebx
push ecx
push 0
push 0
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x402314
mov dword [esp + 0x30], 6
jmp 0x40232c
mov eax, dword [esi + 8]
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40234c
mov dword [esp + 0x30], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f00
jne 0x4023be
push str.resend_request_n
call fcn.0040d6f7
add esp, 4
jmp 0x4023b2
mov edx, dword [esi + 8]
lea ecx, [esp + 0x10]
lea edi, [esi + 0x6c]
push 0
push ecx
push edi
push 0
push 0x20000013
push edx
mov dword [esp + 0x48], 0
mov dword [esp + 0x28], 4
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x40237e
mov dword [edi], eax
cmp dword [edi], 0x197
jne 0x4023a8
push str.proxy_auth_n
call fcn.0040d6f7
add esp, 4
cmp ebp, 0x197
jne 0x4023ef
push str.proxy_auth_again__exit_n
call fcn.0040d6f7
add esp, 4
mov dword [esp + 0x20], 1
mov ebp, dword [edi]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4022e2
mov edx, dword [esi + 8]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
lea ecx, [esp + 0x10]
lea edi, [esi + 0x70]
push 0
push ecx
push edi
push 0
push 0x20000005
push edx
mov dword [esp + 0x28], 4
call ebx
test eax, eax
jne 0x402430
mov dword [esi + 0x64], eax
mov dword [edi], eax
jmp 0x402437
push str.proxy_authing_n
call fcn.0040d6f7
mov eax, dword [esi + 0xa8]
add esp, 4
test eax, eax
mov ecx, 0x439698
je 0x40240d
mov ecx, eax
mov eax, dword [esi + 0x98]
test eax, eax
jne 0x40241c
mov eax, 0x439698
push 0
push ecx
push eax
mov eax, dword [esi + 8]
push 1
push 1
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
jmp 0x4023b0
mov dword [esi + 0x64], 1
push 0x2000
mov dword [esp + 0x14], 0x1000
call fcn.0041d305
mov ecx, dword [esi + 8]
add esp, 4
mov ebp, eax
lea eax, [esp + 0x10]
push 0
push eax
push ebp
push 0
push 0x21
push ecx
mov dword [esp + 0x44], ebp
call ebx
test eax, eax
je 0x4025b8
push ebp
lea edi, [esi + 0x3c]
call fcn.0040d6da
mov ebx, eax
add esp, 4
cmp ebx, 0x7ffffffd
jbe 0x402487
call fcn.004177c8
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x4024ac
mov al, byte [ecx - 1]
test al, al
je 0x4024ac
cmp al, 0xff
je 0x4024ac
test ebx, ebx
jne 0x4024d0
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, edi
call fcn.00402d80
jmp 0x402502
test ebx, ebx
jne 0x4024bb
push 1
mov ecx, edi
call fcn.00402d80
jmp 0x402502
mov eax, dword [edi + 0xc]
cmp eax, 0x1f
ja 0x4024c7
cmp eax, ebx
jae 0x4024d8
push 1
mov ecx, edi
call fcn.00402d80
push ebx
mov ecx, edi
call fcn.00402c70
mov eax, dword [edi + 4]
mov ecx, ebp
test ebx, ebx
jbe 0x4024f6
mov edx, ebx
mov bp, word [ecx]
add ecx, 2
mov word [eax], bp
add eax, 2
dec edx
jne 0x4024e3
mov ebp, dword [esp + 0x2c]
mov edx, dword [edi + 4]
mov dword [edi + 8], ebx
mov word [edx + ebx*2], 0
push ebp
call fcn.00401a10
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
je 0x4025b8
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea ebp, [esi + 0x4c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
cmp ebx, 0xfffffffd
jbe 0x402532
call fcn.004177c8
mov ecx, dword [ebp + 4]
xor edx, edx
cmp ecx, edx
je 0x40255a
mov al, byte [ecx - 1]
test al, al
je 0x40255a
cmp al, 0xff
je 0x40255a
cmp ebx, edx
jne 0x40257e
dec al
mov byte [ecx - 1], al
mov dword [ebp + 4], edx
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], edx
jmp 0x4025a7
cmp ebx, edx
jne 0x402569
push 1
mov ecx, ebp
call fcn.004015c0
jmp 0x4025a7
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x402575
cmp eax, ebx
jae 0x402586
push 1
mov ecx, ebp
call fcn.004015c0
push ebx
mov ecx, ebp
call fcn.00401760
mov esi, dword [esp + 0x20]
mov edi, dword [ebp + 4]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [ebx + ecx], 0
mov edx, dword [esp + 0x20]
push edx
call fcn.0041d32e
mov ebp, dword [esp + 0x30]
add esp, 4
push ebp
call fcn.0041d32e
mov eax, dword [esp + 0x34]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret