Function at 0x40b7e0
Capabilities:
Initialize winhttp library
Make an http request with a cookie
Prepare http request
Read http header
Receive http response
Resolve function by parsing pe exports
Send data
Send http request
Set http header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4489f8
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x11a8
call fcn.00445330
mov eax, dword [0x45a028]
xor eax, esp
mov dword [esp + 0x11a4], eax
push esi
push edi
mov eax, dword [0x45a028]
xor eax, esp
push eax
lea eax, [esp + 0x11b8]
mov dword fs:[0], eax
mov eax, dword [ebx + 0x18]
test eax, eax
jne 0x40b83a
mov dword [ebx + 0x11c], 3
jmp 0x40c7bf
xor esi, esi
xor eax, eax
push esi
mov word [esp + 0xe4], ax
push ecx
or eax, 0xffffffff
lea edi, [esp + 0xe8]
mov dword [esp + 0xfc], 7
mov dword [esp + 0xf8], esi
call fcn.00405d60
mov dword [esp + 0x11c0], esi
mov eax, dword [esp + 0xe0]
mov esi, 8
cmp dword [esp + 0xf4], esi
jae 0x40b887
mov eax, edi
mov edi, dword [sym.imp.MSVCR100.dll__wcsicmp]
push 0x44eb0c
push eax
call edi
add esp, 8
test eax, eax
jne 0x40b8a3
mov eax, 0x44eb0c
jmp 0x40b901
mov eax, dword [esp + 0xe0]
cmp dword [esp + 0xf4], esi
jae 0x40b8ba
lea eax, [esp + 0xe0]
push str.POST
push eax
call edi
add esp, 8
test eax, eax
jne 0x40b8d2
push 4
mov eax, str.POST
jmp 0x40b903
mov eax, dword [esp + 0xe0]
cmp dword [esp + 0xf4], esi
jae 0x40b8e9
lea eax, [esp + 0xe0]
push 0x44f16c
push eax
call edi
add esp, 8
test eax, eax
jne 0x40c79e
mov eax, 0x44f16c
push 3
lea ecx, [esp + 0xe4]
call fcn.00405f90
cmp dword [ebx], 0
mov byte [esp + 0x12], 1
jne 0x40b978
cmp dword [ebx + 0x150], esi
lea eax, [ebx + 0x13c]
jb 0x40b929
mov eax, dword [eax]
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebx], eax
test eax, eax
jne 0x40b978
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x11c0], 0xffffffff
mov dword [ebx + 0x11c], eax
cmp dword [esp + 0xf4], esi
jb 0x40c7bf
mov ecx, dword [esp + 0xe0]
push ecx
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
jmp 0x40c7bf
mov edx, dword [ebx + 0x1bc]
mov eax, dword [ebx + 0x1b8]
mov ecx, dword [ebx + 0x1b4]
push edx
mov edx, dword [ebx + 0x1b0]
push eax
mov eax, dword [ebx]
push ecx
push edx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x37e]
push edx
mov word [esp + 0x380], cx
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
push 0xa26
push eax
lea ecx, [esp + 0x78e]
push ecx
mov word [esp + 0x790], ax
call sub.MSVCR100.dll_memset
add esp, 0xc
push 0x3c
lea edx, [esp + 0xa8]
push 0
push edx
call sub.MSVCR100.dll_memset
lea eax, [esp + 0x380]
mov dword [esp + 0xc0], eax
lea ecx, [esp + 0x790]
lea eax, [ebx + 8]
add esp, 0xc
mov dword [esp + 0xd0], ecx
mov ecx, dword [ebx + 0x18]
mov dword [esp + 0xa4], 0x3c
mov dword [esp + 0xb8], 0x104
mov dword [esp + 0xd4], 0x514
mov dword [esp + 0xac], 1
cmp dword [eax + 0x14], esi
jb 0x40ba46
mov eax, dword [eax]
lea edx, [esp + 0xa4]
push edx
push 0
push ecx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x40c773
lea eax, [esp + 0x374]
lea edx, [eax + 2]
mov esi, 2
nop
mov cx, word [eax]
add eax, esi
test cx, cx
jne 0x40ba70
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebx + 0x24]
lea eax, [esp + 0x378]
call fcn.00405f90
mov eax, dword [esp + 0xbc]
mov edx, dword [ebx]
push 0
push eax
lea ecx, [esp + 0x37c]
push ecx
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, eax
mov dword [esp + 0xa0], edi
test edi, edi
je 0x40c76e
mov eax, dword [esp + 0xe0]
xor ecx, ecx
cmp dword [esp + 0xb0], esi
setne cl
dec ecx
and ecx, 0x800000
cmp dword [esp + 0xf4], 8
jae 0x40bae5
lea eax, [esp + 0xe0]
push ecx
mov ecx, dword [esp + 0xd4]
push 0
push 0
push 0
push ecx
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40c767
cmp byte [ebx + 4], 0
jne 0x40bb2f
cmp dword [esp + 0xb0], esi
jne 0x40bb2f
push 4
lea edx, [esp + 0x2c]
push edx
push 0x1f
push eax
mov dword [esp + 0x38], 0x3100
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov byte [esp + 0x13], 0
mov dword [esp + 0x3c], 0
lea esp, [esp]
mov eax, dword [esp + 0x3c]
mov ecx, eax
inc eax
mov dword [esp + 0x3c], eax
cmp ecx, 3
jae 0x40c749
mov ecx, dword [ebx + 0xf4]
test ecx, ecx
je 0x40bb91
cmp dword [ebx + 0xf8], 8
lea eax, [ebx + 0xe4]
jb 0x40bb6f
mov eax, dword [eax]
mov edx, dword [esp + 0x14]
push 0x1000000
push ecx
push eax
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x40bb91
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x11c], eax
cmp dword [ebx + 0xd0], 0
jbe 0x40bc16
mov eax, str.Cookie:
lea esi, [esp + 0xfc]
call fcn.00405a90
push 0
lea eax, [ebx + 0xc0]
push eax
or eax, 0xffffffff
mov edi, esi
mov byte [esp + 0x11c8], 1
call fcn.00409af0
cmp dword [esp + 0x110], 8
mov eax, dword [esp + 0xfc]
jae 0x40bbd9
mov eax, esi
mov ecx, dword [esp + 0x10c]
mov edx, dword [esp + 0x14]
push 0x1000000
push ecx
push eax
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x40bc02
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x11c], eax
lea esi, [esp + 0xfc]
mov byte [esp + 0x11c0], 0
call fcn.00405ad0
cmp dword [ebx + 0x110], 0
jbe 0x40bd39
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x176]
mov dword [esp + 0x98], eax
push ecx
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0x9c], 3
mov word [esp + 0x178], ax
call sub.MSVCR100.dll_memset
lea eax, [ebx + 0x100]
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x40bc71
mov eax, dword [eax]
mov edi, dword [sym.imp.MSVCR100.dll_wcscpy_s]
push eax
lea edx, [esp + 0x170]
push 0x104
push edx
call edi
mov edx, dword [esp + 0x20]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
add esp, 0xc
push 0xc
lea ecx, [esp + 0x94]
push ecx
push 0x26
lea eax, [esp + 0x178]
push edx
mov dword [esp + 0xa4], eax
call esi
test eax, eax
jne 0x40bcc1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x11c], eax
mov ecx, dword [ebx + 0x16c]
test ecx, ecx
je 0x40bd3f
cmp dword [ebx + 0x170], 8
lea eax, [ebx + 0x15c]
jb 0x40bcdc
mov eax, dword [eax]
mov edx, dword [esp + 0x14]
add ecx, ecx
push ecx
push eax
push 0x1002
push edx
call esi
test eax, eax
jne 0x40bcfc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x11c], eax
mov ecx, dword [ebx + 0x188]
test ecx, ecx
je 0x40bd3f
cmp dword [ebx + 0x18c], 8
lea eax, [ebx + 0x178]
jb 0x40bd17
mov eax, dword [eax]
mov edx, dword [esp + 0x14]
add ecx, ecx
push ecx
push eax
push 0x1003
push edx
call esi
test eax, eax
jne 0x40bd3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x11c], eax
jmp 0x40bd3f
mov edi, dword [sym.imp.MSVCR100.dll_wcscpy_s]
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
push 0
push 0
push 0
push eax
mov byte [esp + 0x43], 0
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x40bf7c
lea ecx, [esp + 0x40]
push ecx
xor esi, esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x40c72b
mov ecx, dword [esp + 0x44]
cmp ecx, esi
je 0x40be77
xor eax, eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov eax, 1
mov dword [esp + 0x7c], eax
mov dword [esp + 0x8c], eax
xor eax, eax
cmp dword [ebx + 0x1c], 8
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
lea eax, [ebx + 8]
mov dword [esp + 0x78], 3
mov dword [esp + 0x80], ecx
mov dword [esp + 0x88], esi
mov dword [esp + 0x84], esi
jb 0x40be00
mov eax, dword [eax]
lea edx, [esp + 0x60]
push edx
mov edx, dword [ebx]
lea ecx, [esp + 0x7c]
push ecx
push eax
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
test eax, eax
je 0x40bf38
mov esi, dword [esp + 0x14]
push 0xc
lea eax, [esp + 0x64]
push eax
push 0x26
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x40be50
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x40be50
mov byte [esp + 0x27], 1
mov eax, dword [esp + 0x64]
test eax, eax
je 0x40be5f
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x68]
test eax, eax
je 0x40bf44
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x40bf44
mov esi, dword [esp + 0x48]
test esi, esi
je 0x40bf62
xor ecx, ecx
xor eax, eax
push 0x206
push ecx
lea edx, [esp + 0x176]
mov dword [esp + 0x74], eax
push edx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x78], 3
mov word [esp + 0x178], cx
call sub.MSVCR100.dll_memset
add esp, 0xc
push esi
lea eax, [esp + 0x170]
push 0x104
push eax
call edi
mov esi, dword [esp + 0x58]
add esp, 0xc
lea ecx, [esp + 0x16c]
mov dword [esp + 0x70], ecx
test esi, esi
je 0x40bf20
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x586]
push eax
mov word [esp + 0x588], dx
call sub.MSVCR100.dll_memset
add esp, 0xc
push esi
lea ecx, [esp + 0x580]
push 0x104
push ecx
call edi
lea edx, [esp + 0x588]
add esp, 0xc
mov dword [esp + 0x74], edx
mov ecx, dword [esp + 0x14]
push 0xc
lea eax, [esp + 0x70]
push eax
push 0x26
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x40bf44
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x11c], eax
mov eax, dword [esp + 0x44]
test eax, eax
je 0x40bf53
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x48]
test eax, eax
je 0x40bf62
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x40bf71
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp byte [esp + 0x27], 0
je 0x40c737
mov eax, dword [ebx + 0xdc]
xor edi, edi
cmp eax, edi
je 0x40bfb4
mov ecx, dword [ebx + 0xe0]
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x18]
push ecx
push eax
push edx
mov dword [esp + 0x38], edi
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
jne 0x40bfb4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x11c], eax
mov esi, dword [esp + 0x14]
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x40c72b
push edi
lea eax, [esp + 0x1c]
push eax
push edi
push edi
push 0x16
push esi
mov dword [esp + 0x30], edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp eax, edi
jne 0x40bff0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40c318
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call dword [sym.imp.mfc100u.dll_new__]
mov esi, eax
add esp, 4
mov dword [esp + 0x28], esi
test esi, esi
je 0x40c318
mov eax, dword [esp + 0x18]
lea ecx, [eax + eax]
push ecx
push 0
push esi
call sub.MSVCR100.dll_memset
mov eax, dword [esp + 0x20]
add esp, 0xc
push 0
lea edx, [esp + 0x1c]
push edx
push esi
push 0
push 0x16
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x40c30e
lea edi, [ebx + 0x40]
push edi
mov eax, esi
call fcn.00405e10
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov eax, 0x44d384
lea esi, [esp + 0xfc]
mov byte [esp + 0x11c0], 2
call fcn.00405a90
mov byte [esp + 0x11c0], 3
cmp byte [ebx + 0x158], 0
jne 0x40c0e0
mov ecx, esi
push ecx
mov eax, str.charset_A_Za_z0_9___
call fcn.00405e10
lea edx, [esp + 0x2c]
push edx
mov edx, edi
mov ecx, esi
call fcn.0040ace0
add esp, 4
test al, al
je 0x40c0e0
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40c0e0
push 0
lea edi, [ebx + 0x78]
push esi
or eax, 0xffffffff
call fcn.00405d60
lea ecx, [esp + 0xfc]
push ecx
mov eax, str.Content_Length:__0_9_
call fcn.00405e10
lea edx, [esp + 0x2c]
push edx
lea edx, [ebx + 0x40]
lea ecx, [esp + 0x100]
call fcn.0040ace0
add esp, 4
test al, al
je 0x40c144
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40c144
cmp dword [esi + 0x14], 8
jb 0x40c134
mov esi, dword [esi]
push esi
call dword [sym.imp.MSVCR100.dll__wtoi]
add esp, 4
mov dword [ebx + 0xa0], eax
lea ecx, [esp + 0xfc]
push ecx
mov eax, str.Location:__0_9_
call fcn.00405e10
lea edx, [esp + 0x2c]
push edx
lea edx, [ebx + 0x40]
lea ecx, [esp + 0x100]
call fcn.0040ace0
add esp, 4
test al, al
je 0x40c1a1
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40c1a1
push 0
push esi
lea edi, [ebx + 0x194]
or eax, 0xffffffff
call fcn.00405d60
lea ecx, [esp + 0xfc]
push ecx
mov eax, str.Set_Cookie:_b.__n
call fcn.00405e10
lea edx, [esp + 0x2c]
push edx
lea edx, [ebx + 0x40]
lea ecx, [esp + 0x100]
call fcn.0040ace0
add esp, 4
test al, al
je 0x40c2e5
mov ecx, dword [esp + 0x30]
sub ecx, dword [esp + 0x2c]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
je 0x40c2e5
mov dword [esp + 0x1c], 0
test esi, esi
je 0x40c245
mov eax, dword [esp + 0x2c]
lea edi, [ebx + 0xa4]
mov dword [esp + 0x20], eax
lea ecx, [ecx]
mov ecx, dword [esp + 0x20]
push 0
push ecx
or eax, 0xffffffff
call fcn.00409af0
lea eax, [esi - 1]
cmp dword [esp + 0x1c], eax
je 0x40c233
push edi
mov eax, 0x44d364
call fcn.00409650
mov eax, dword [esp + 0x1c]
add dword [esp + 0x20], 0x1c
inc eax
mov dword [esp + 0x1c], eax
cmp eax, esi
jb 0x40c210
mov eax, 0x44f158
lea esi, [esp + 0x134]
call fcn.00405a90
lea edx, [esp + 0x134]
push edx
lea esi, [ebx + 0xa4]
push esi
lea edx, [esp + 0x158]
mov byte [esp + 0x11c8], 4
call fcn.0040b0c0
add esp, 8
mov edi, eax
mov byte [esp + 0x11c0], 5
call fcn.004095e0
lea esi, [esp + 0x150]
mov byte [esp + 0x11c0], 4
call fcn.00405ad0
lea esi, [esp + 0x134]
mov byte [esp + 0x11c0], 3
call fcn.00405ad0
mov eax, dword [ebx + 0xb4]
test eax, eax
je 0x40c2e5
cmp dword [ebx + 0xb8], 8
lea ecx, [ebx + 0xa4]
jb 0x40c2d0
mov edx, dword [ecx]
jmp 0x40c2d2
mov edx, ecx
cmp word [edx + eax*2 - 2], 0x3b
je 0x40c2e5
push ecx
mov eax, 0x44f244
call fcn.00409650
lea esi, [esp + 0xfc]
mov byte [esp + 0x11c0], 2
call fcn.00405ad0
lea esi, [esp + 0x2c]
mov byte [esp + 0x11c0], 0
call fcn.00409120
mov esi, dword [esp + 0x28]
push esi
call dword [sym.imp.mfc100u.dll_delete__]
add esp, 4
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0x13
push ecx
mov dword [esp + 0x30], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x40c347
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40c3b1
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call dword [sym.imp.mfc100u.dll_new__]
mov esi, eax
add esp, 4
test esi, esi
je 0x40c3b1
mov eax, dword [esp + 0x18]
lea ecx, [eax + eax]
push ecx
push 0
push esi
call sub.MSVCR100.dll_memset
mov eax, dword [esp + 0x20]
add esp, 0xc
push 0
lea edx, [esp + 0x1c]
push edx
push esi
push 0
push 0x13
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x40c3a7
lea ecx, [ebx + 0x120]
push ecx
mov eax, esi
call fcn.00405e10
push esi
call dword [sym.imp.mfc100u.dll_delete__]
add esp, 4
mov eax, dword [ebx + 0x94]
xor esi, esi
mov dword [esp + 0x20], 0x2800
test eax, eax
je 0x40c3d5
push eax
call dword [sym.imp.mfc100u.dll_delete__]
add esp, 4
mov dword [ebx + 0x94], esi
push 0x2800
call dword [sym.imp.mfc100u.dll_new__]
add esp, 4
mov dword [ebx + 0x94], eax
test eax, eax
je 0x40c744
push 0x2800
push 0
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push eax
mov dword [esp + 0x20], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x40c50d
push esi
mov edx, ebx
call fcn.0040c850
mov ecx, dword [esp + 0x18]
inc ecx
push ecx
call dword [sym.imp.mfc100u.dll_new__]
mov edi, eax
add esp, 4
mov dword [esp + 0x9c], edi
test edi, edi
je 0x40c519
mov edx, dword [esp + 0x18]
inc edx
push edx
push 0
push edi
call sub.MSVCR100.dll_memset
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
push ecx
push edi
push edx
mov dword [esp + 0x2c], 0
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40c501
mov eax, dword [esp + 0x1c]
add eax, esi
cmp eax, dword [esp + 0x20]
jbe 0x40c4e6
mov eax, dword [esp + 0x20]
mov edi, dword [ebx + 0x94]
add eax, eax
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.mfc100u.dll_new__]
add esp, 4
mov dword [ebx + 0x94], eax
test eax, eax
je 0x40c526
mov ecx, dword [esp + 0x28]
push ecx
push 0
push eax
mov dword [esp + 0x2c], ecx
call sub.MSVCR100.dll_memset
mov ecx, dword [ebx + 0x94]
add esp, 0xc
push esi
push edi
push ecx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push edi
call dword [sym.imp.mfc100u.dll_delete__]
mov edi, dword [esp + 0xa0]
add esp, 4
mov edx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x94]
push edx
add eax, esi
push edi
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
add esi, dword [esp + 0x1c]
push edi
call dword [sym.imp.mfc100u.dll_delete__]
add esp, 4
jmp 0x40c519
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x11c], eax
cmp dword [esp + 0x18], 0
ja 0x40c401
jmp 0x40c531
mov dword [ebx + 0x94], edi
mov byte [esp + 0x12], 0
push esi
mov edx, ebx
call fcn.0040c850
mov dword [ebx + 0x98], esi
xor esi, esi
cmp dword [ebx + 0x8c], 8
lea eax, [ebx + 0x78]
mov edi, 1
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
jb 0x40c55c
mov eax, dword [eax]
push 5
push 0x44f248
push eax
call dword [sym.imp.MSVCR100.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x40c580
mov esi, 0xfde9
xor edi, edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
mov ecx, dword [ebx + 0x98]
mov edx, dword [ebx + 0x94]
push 0
push 0
inc ecx
push ecx
push edx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
call edi
mov esi, eax
test esi, esi
jg 0x40c5d2
mov eax, dword [ebx + 0x98]
mov ecx, dword [ebx + 0x94]
push 0
push 0
inc eax
push eax
push ecx
push 1
push 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 1
call edi
mov esi, eax
test esi, esi
jle 0x40c63d
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call dword [sym.imp.mfc100u.dll_new__]
mov edi, eax
add esp, 4
test edi, edi
je 0x40c63d
lea eax, [esi + esi]
push eax
push 0
push edi
call sub.MSVCR100.dll_memset
mov ecx, dword [ebx + 0x98]
mov edx, dword [ebx + 0x94]
mov eax, dword [esp + 0x2c]
add esp, 0xc
push esi
push edi
inc ecx
push ecx
mov ecx, dword [esp + 0x28]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x40c633
lea edx, [ebx + 0x5c]
push edx
mov eax, edi
call fcn.00405e10
push edi
call dword [sym.imp.mfc100u.dll_delete__]
add esp, 4
mov esi, 0x44eb0c
lea ecx, [esp + 0xe0]
mov byte [esp + 0x13], 1
call fcn.004126a0
test al, al
je 0x40c755
mov eax, str._html_
lea esi, [esp + 0x118]
call fcn.00405a90
xor eax, eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
lea eax, [esp + 0x50]
push eax
lea edx, [ebx + 0x5c]
mov ecx, esi
mov byte [esp + 0x11c4], 7
call fcn.0040ace0
add esp, 4
test al, al
je 0x40c704
mov ecx, dword [esp + 0x54]
sub ecx, dword [esp + 0x50]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
je 0x40c704
mov edx, esi
push edx
mov eax, str.__html_
call fcn.00405e10
lea eax, [esp + 0x50]
push eax
lea edx, [ebx + 0x5c]
mov ecx, esi
call fcn.0040ace0
add esp, 4
test al, al
je 0x40c6f5
mov ecx, dword [esp + 0x54]
sub ecx, dword [esp + 0x50]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x40c704
mov dword [ebx + 0x11c], 0xd
mov byte [esp + 0x13], 0
lea esi, [esp + 0x50]
mov byte [esp + 0x11c0], 6
call fcn.00409120
lea esi, [esp + 0x118]
mov byte [esp + 0x11c0], 0
call fcn.00405ad0
jmp 0x40c737
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x11c], eax
cmp byte [esp + 0x13], 0
je 0x40bb40
jmp 0x40c755
mov byte [esp + 0x12], 0
cmp byte [esp + 0x13], 0
jne 0x40c755
mov byte [esp + 0x12], 0
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edi, dword [esp + 0xa0]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov esi, 8
mov dword [esp + 0x11c0], 0xffffffff
cmp dword [esp + 0xf4], esi
jb 0x40c798
mov eax, dword [esp + 0xe0]
push eax
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
mov al, byte [esp + 0x12]
jmp 0x40c7c1
lea esi, [esp + 0xe0]
mov dword [ebx + 0x11c], 0x57
mov dword [esp + 0x11c0], 0xffffffff
call fcn.00405ad0
xor al, al
mov ecx, dword [esp + 0x11b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x11a4]
xor ecx, esp
call fcn.00441db6
mov esp, ebp
pop ebp
ret