Function at 0x407470
Capabilities:
Receive http response

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, ecx
test ebx, ebx
je 0x407721
cmp word [ebx], 0
je 0x407721
xorps xmm0, xmm0
sub esp, 0x10
lea ecx, [ebp - 0x24]
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x1c], 0
call fcn.00408250
test al, al
je 0x4076ec
push ecx
push ebx
lea ecx, [ebp - 0x24]
call fcn.004082e0
test al, al
je 0x4076ec
xor bh, bh
mov byte [ebp - 5], 0
mov byte [ebp - 6], bh
cmp byte [esi + 0x30], bh
jbe 0x4076f0
jmp 0x4074e0
push 0
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4076f0
lea eax, [esi + 4]
push eax
mov edi, 1
xor bl, bl
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 0x2c]
test ecx, ecx
je 0x407551
mov eax, dword [esi + 0x28]
mov bl, 1
movq xmm0, qword [eax]
movq qword [ebp - 0x44], xmm0
movq xmm0, qword [eax + 8]
movq qword [ebp - 0x3c], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x34], xmm0
movq xmm0, qword [eax + 0x18]
movq qword [ebp - 0x2c], xmm0
cmp ecx, 1
jbe 0x407551
movzx eax, byte [esi + 0x30]
movzx ecx, bh
inc ecx
cmp ecx, eax
mov eax, 3
cmovl edi, eax
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test bl, bl
je 0x4076f0
mov eax, dword [esi]
lea ecx, [ebp - 0x44]
push ecx
push dword [ebp + 8]
mov ecx, esi
mov byte [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
call dword [eax + 0x1c]
test eax, eax
je 0x4076d4
push edi
push dword [ebp - 0x30]
lea ecx, [ebp - 0x24]
sub esp, 0xc
push eax
call fcn.00408340
test al, al
je 0x4076d4
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4075c3
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x24]
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
je 0x4076d4
push 0
push dword [ebp - 0x24]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x4076d4
lea ecx, [ebp - 0x24]
call fcn.00408640
cmp eax, 0xc8
jne 0x4076d4
cmp byte [esi + 0x38], 0
je 0x4075f4
mov eax, dword [esi + 0x34]
jmp 0x4075f6
xor eax, eax
push eax
push ecx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x24]
call fcn.00408410
test al, al
je 0x4076d4
cmp dword [ebp - 0x10], 0
je 0x4076d4
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x14]
call fcn.004078f0
test al, al
je 0x4076d4
mov eax, dword [ebp - 0x44]
mov byte [ebp - 5], 1
test eax, eax
je 0x40764b
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x44]
push ecx
push dword [esi + 0x1c]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jne 0x40765a
mov eax, dword [esi]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x44]
push ecx
mov ecx, esi
call dword [eax + 0x24]
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x407668
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ebx, [esi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 0x2c]
xor edx, edx
test ecx, ecx
je 0x40769c
mov eax, dword [esi + 0x28]
mov edi, dword [ebp - 0x3c]
add eax, 8
cmp dword [eax], edi
je 0x407692
inc edx
add eax, 0x20
cmp edx, ecx
jb 0x407684
jmp 0x40769c
mov eax, dword [esi + 0x24]
lea ecx, [esi + 0x24]
push edx
call dword [eax + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x44]
call fcn.00407390
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4076c1
push eax
push 0
push dword [0x41623c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov bh, byte [ebp - 6]
inc bh
mov byte [ebp - 6], bh
cmp bh, byte [esi + 0x30]
jb 0x4074e0
jmp 0x4076f0
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4076f0
push eax
push 0
push dword [0x41623c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4076f0
mov byte [ebp - 5], 0
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea esi, [ebp - 0x24]
mov edi, 3
mov edi, edi
mov eax, dword [esi]
test eax, eax
je 0x40770f
push eax
call ebx
mov dword [esi], 0
add esi, 4
dec edi
jne 0x407700
mov al, byte [ebp - 5]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4