Function at 0x40e360
Capabilities:
Prepare http request
Receive http response
Set http header

Disassembly:
push 0xffffffffffffffff
push 0x43ddcb
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x451d80]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x451d80]
xor eax, esp
push eax
lea eax, [esp + 0x254]
mov dword fs:[0], eax
mov eax, dword [esp + 0x268]
mov ebp, dword [esp + 0x264]
mov dword [esp + 0x34], ecx
xor ecx, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x27c]
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0x14], ecx
mov dword [eax], ecx
cmp dword [ebp], ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x2c], ecx
je 0x40e56f
mov esi, dword [esp + 0x274]
mov edi, edi
cmp dword [ebp + 4], 0
je 0x40e56f
mov edi, dword [esp + 0x2c]
cmp edi, 1
jne 0x40e3fc
mov eax, ebp
call fcn.0040def0
jmp 0x40e402
jg 0x40e5ad
mov eax, dword [ebp + 8]
add edi, 1
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x2c], edi
je 0x40e41c
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp + 8], ebx
mov eax, dword [esp + 0x14]
mov ecx, dword [0x456190]
mov edx, dword [ebp + 4]
push 0x100
push ebx
push ebx
push ebx
push eax
push ecx
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x40e5b8
mov edi, ebp
call fcn.0040eca0
cmp word [ebp + 0x24], bx
lea eax, [ebp + 0x24]
je 0x40e46f
push 0xa0000000
push 0xffffffffffffffff
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x40e5f8
mov edx, dword [esp + 0x278]
mov ecx, esi
or ecx, edx
je 0x40e4c4
mov ecx, dword [esp + 0x26c]
mov eax, dword [esp + 0x270]
mov edi, ecx
mov ebx, eax
add edi, esi
adc ebx, edx
mov edx, dword [0x45618c]
add edi, 0xffffffff
adc ebx, 0xffffffff
push ebx
push edi
push eax
push ecx
push edx
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov edx, dword [ebp + 8]
add esp, 0x18
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
lea ecx, [esp + 0x60]
push ecx
push edx
jmp 0x40e4ce
mov eax, dword [ebp + 8]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, ebx
jne 0x40e507
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x278]
mov edx, dword [esp + 0x270]
push eax
push ecx
mov ecx, dword [esp + 0x1c]
push esi
push edx
mov dword [ebp + 0x14], eax
mov eax, dword [esp + 0x27c]
push eax
push ecx
push str._CHTTPRequest___IntenalGet___s___llu___llu__WinHttpSendRequest_failed__errno_d
jmp 0x40e547
mov edx, dword [ebp + 8]
push ebx
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40e63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x270]
mov edx, dword [esp + 0x26c]
push eax
mov dword [ebp + 0x14], eax
mov eax, dword [esp + 0x27c]
push eax
mov eax, dword [esp + 0x1c]
push esi
push ecx
push edx
push eax
push str._CHTTPRequest___IntenalGet___s___llu___llu__WinHttpReceiveResponse_failed__errno_d
mov ebx, 4
call fcn.004156d0
mov eax, dword [ebp + 0x14]
add esp, 0x1c
cmp eax, 0x2efd
je 0x40e565
cmp eax, 0x2efe
jne 0x40e581
cmp dword [ebp], 0
jne 0x40e3e0
push str._CHTTPRequest___IntenalGet__Invalid_handle
mov ebx, 4
call fcn.004156d0
add esp, 4
xor al, al
mov ecx, dword [esp + 0x254]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.0042655f
add esp, 0x24c
ret 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x14], eax
jmp 0x40e581
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov dword [ebp + 0x14], eax
call edi
mov ecx, dword [esp + 0x278]
mov edx, dword [esp + 0x270]
push eax
mov eax, dword [esp + 0x270]
push ecx
mov ecx, dword [esp + 0x1c]
push esi
push edx
push eax
push ecx
push str._CHTTPRequest___IntenalGet___s___llu___llu__WinHttpOpenRequest_failed__errno_d
mov ebx, 4
call fcn.004156d0
add esp, 0x1c
jmp 0x40e581
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov dword [ebp + 0x14], eax
call edi
mov edx, dword [esp + 0x278]
mov ecx, dword [esp + 0x26c]
push eax
mov eax, dword [esp + 0x274]
add ebp, 0x24
push ebp
push edx
mov edx, dword [esp + 0x20]
push esi
push eax
push ecx
push edx
push str._CHTTPRequest___IntenalGet___s___llu___llu__WinHttpAddRequestHeaders__s__failed__errno_d
mov ebx, 4
call fcn.004156d0
add esp, 0x20
jmp 0x40e581
mov eax, dword [ebp + 8]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x25c], ebx
call fcn.0040edb0
mov ecx, eax
mov eax, 0x51eb851f
mul ecx
shr edx, 5
cmp edx, 2
mov dword [ebp + 0x10], ecx
je 0x40e6a0
mov edx, dword [esp + 0x270]
mov eax, dword [esp + 0x26c]
push ecx
mov ecx, dword [esp + 0x27c]
push ecx
mov ecx, dword [esp + 0x1c]
push esi
push edx
push eax
push ecx
push str._CHTTPRequest___IntenalGet___s___llu___llu__check_response_code_failed__response_code_d
mov ebx, 4
call fcn.004156d0
add esp, 0x1c
jmp 0x40e581
xor edi, edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebx
mov edi, edi
mov eax, dword [ebp + 8]
lea edx, [esp + 0x24]
push edx
push eax
mov dword [esp + 0x2c], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x40e9d0
mov eax, dword [esp + 0x24]
xor ecx, ecx
mov edx, eax
add edx, edi
adc ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x278]
jb 0x40e74f
ja 0x40e6e8
cmp edx, esi
jbe 0x40e74f
mov edx, dword [esp + 0x20]
mov ecx, edi
sub ecx, esi
add ecx, eax
push ecx
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x27c]
push ecx
push esi
push eax
mov eax, dword [esp + 0x280]
push edx
mov edx, dword [esp + 0x28]
push edi
push ecx
mov ecx, dword [esp + 0x288]
push esi
push eax
push ecx
push edx
push str._CHTTPRequest___IntenalGet___s___llu___llu__WinHttpQueryDataAvailable_too_long__dwNumberOfBytesRead_llu_dwSize_d_nContentLength_llu_dwMoreDataLen_d
mov ebx, 3
call fcn.004156d0
mov eax, dword [esp + 0x50]
add esp, 0x30
cmp dword [esp + 0x278], eax
jb 0x40ea13
ja 0x40e747
cmp esi, edi
jbe 0x40ea13
mov eax, esi
sub eax, edi
mov dword [esp + 0x24], eax
mov ecx, dword [ebp + 0x20]
xor ebx, ebx
cmp ecx, ebx
je 0x40e903
cmp dword [ecx], ebx
jne 0x40e77b
mov ecx, dword [0x456184]
cmp ecx, ebx
je 0x40e903
cmp dword [ecx + 0x1c], ebx
mov eax, dword [esp + 0x24]
je 0x40e903
cmp eax, ebx
mov dword [esp + 0x28], eax
jbe 0x40e581
jmp 0x40e790
cmp dword [ebp + 8], 0
je 0x40e8e6
mov ecx, dword [ebp + 0x8c]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [ebp + 0x20]
mov dword [esp + 0x30], 0
call fcn.0040f200
mov edi, eax
mov eax, dword [0x456184]
xor esi, esi
test eax, eax
je 0x40e7f7
mov edx, dword [eax + 0x1c]
test edx, edx
je 0x40e809
call fcn.0040cfc0
mov dword [esp + 0x44], eax
mov eax, dword [0x456184]
mov eax, dword [eax + 0x1c]
test eax, eax
jbe 0x40e7ee
mov ecx, dword [esp + 0x44]
cmp eax, ecx
jbe 0x40e7ee
mov esi, eax
sub esi, ecx
cmp edi, 0xffffffff
jne 0x40e820
mov edi, esi
jmp 0x40e812
push str._GetLastSecondDownloadValue__statistics_obj_not_initialized
mov ebx, 4
call fcn.004156d0
add esp, 4
cmp edi, 0xffffffff
jne 0x40e812
mov edi, dword [esp + 0x28]
test edi, edi
jne 0x40e82c
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e84f
cmp edi, esi
jbe 0x40e812
test eax, eax
jbe 0x40e812
mov edi, esi
jmp 0x40e812
cmp edi, dword [esp + 0x28]
mov esi, dword [ebp + 0x20]
jbe 0x40e842
mov edi, dword [esp + 0x28]
call fcn.0040f180
mov esi, edi
jmp 0x40e853
call fcn.0040f180
sub dword [esp + 0x28], edi
mov dword [esp + 0x30], edi
mov esi, dword [esp + 0x30]
mov ecx, dword [ebp + 0x8c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test esi, esi
jbe 0x40e8db
mov eax, dword [esp + 0x34]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpReadData]
lea edx, [esp + 0x18]
push edx
mov edx, dword [ebp + 8]
push esi
mov esi, dword [esp + 0x24]
lea ecx, [esi + eax]
push ecx
push edx
mov dword [esp + 0x28], 0
call ebx
test eax, eax
je 0x40ea55
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
add esi, eax
adc ecx, 0
test eax, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ecx
je 0x40ea9f
mov eax, dword [esp + 0x278]
test eax, eax
ja 0x40e8c4
cmp dword [esp + 0x274], 0
jbe 0x40e8db
cmp eax, ecx
jb 0x40ea9f
ja 0x40e8db
cmp dword [esp + 0x274], esi
jbe 0x40ea9f
cmp dword [esp + 0x28], 0
ja 0x40e790
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x274]
cmp dword [esp + 0x24], 0
jbe 0x40e581
xor ebx, ebx
jmp 0x40e6b0
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [ebp + 8]
push eax
lea eax, [edi + edx]
push eax
push ecx
mov dword [esp + 0x28], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40eae2
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 0x20]
add edi, ecx
adc dword [esp + 0x20], ebx
cmp eax, ebx
mov dword [esp + 0x1c], edi
je 0x40e954
mov edi, ecx
mov esi, eax
call fcn.0040f180
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x274]
mov edi, dword [esp + 0x1c]
test ecx, ecx
je 0x40e981
cmp dword [esp + 0x278], 0
ja 0x40e966
test esi, esi
jbe 0x40e8f1
mov edx, dword [esp + 0x20]
cmp dword [esp + 0x278], edx
jb 0x40e981
ja 0x40e8f1
cmp esi, edi
ja 0x40e8f1
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x20]
mov dword [eax], edi
mov edi, dword [esp + 0x2c]
test edi, edi
mov dword [eax + 4], ecx
jbe 0x40eadb
push edi
call fcn.0041926e
add esp, 4
lea edx, [esp + 0x18]
push edx
mov esi, eax
mov eax, dword [ebp + 8]
push edi
push esi
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
push esi
call fcn.00419273
mov ecx, dword [esp + 0x40]
add esp, 4
mov dword [ecx], 1
mov al, 1
jmp 0x40e583
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov dword [ebp + 0x14], eax
call edi
mov ecx, dword [esp + 0x270]
mov edx, dword [esp + 0x26c]
push eax
mov eax, dword [esp + 0x27c]
push eax
mov eax, dword [esp + 0x1c]
push esi
push ecx
push edx
push eax
push str._CHTTPRequest___IntenalGet___s___llu___llu__WinHttpQueryDataAvailable_failed__errno_d
mov ebx, 4
call fcn.004156d0
add esp, 0x1c
jmp 0x40e581
mov eax, dword [esp + 0x278]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push eax
push esi
push ecx
mov ecx, dword [esp + 0x278]
push edx
mov edx, dword [esp + 0x24]
push edi
push eax
mov eax, dword [esp + 0x288]
push esi
push eax
push ecx
push edx
push str._CHTTPRequest___IntenalGet___s___llu___llu__WinHttpQueryDataAvailable_error__dwNumberOfBytesRead_llu_dwSize_d_nContentLength_llu
mov ebx, 4
call fcn.004156d0
add esp, 0x2c
jmp 0x40e581
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov dword [ebp + 0x14], eax
call esi
mov ecx, dword [esp + 0x274]
mov edx, dword [esp + 0x270]
push eax
mov eax, dword [esp + 0x27c]
push eax
mov eax, dword [esp + 0x274]
push ecx
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
push str._CHTTPRequest___IntenalGet___s___llu___llu__WinHttpReadData_failed__errno_d
mov ebx, 4
call fcn.004156d0
add esp, 0x1c
jmp 0x40e581
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x2c]
test edi, edi
mov dword [eax], esi
mov dword [eax + 4], ecx
jbe 0x40eadb
push edi
call fcn.0041926e
add esp, 4
lea edx, [esp + 0x18]
push edx
mov esi, eax
mov eax, dword [ebp + 8]
push edi
push esi
push eax
call ebx
push esi
call fcn.00419273
mov ecx, dword [esp + 0x40]
add esp, 4
mov dword [ecx], 1
mov al, 1
jmp 0x40e583
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov dword [ebp + 0x14], eax
call edi
mov edx, dword [esp + 0x278]
mov ecx, dword [esp + 0x26c]
push eax
mov eax, dword [esp + 0x274]
push edx
mov edx, dword [esp + 0x1c]
push esi
push eax
push ecx
push edx
jmp 0x40ea88