Function at 0x412984
Capabilities:
Make an http request with a cookie
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x400b
push 0
push 0
dec ecx
jne 0x41298d
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov byte [ebp - 1], dl
mov ebx, eax
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp - 8]
call fcn.00403bb4
mov eax, dword [ebp + 0x14]
call fcn.00403bb4
mov eax, dword [ebp + 0xc]
call fcn.00403bb4
xor eax, eax
push ebp
push 0x413334
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
mov dword [ebx + 0x6c], 0x64
lea eax, [ebx + 0x70]
call fcn.00403734
lea eax, [ebx + 0x7c]
call fcn.00403d88
mov dword [ebx + 0x14], 0x50
lea eax, [ebx + 0xc]
push eax
lea eax, [ebx + 0x14]
push eax
lea eax, [ebx + 0x10]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 8]
mov eax, ebx
call fcn.00412048
test esi, esi
je 0x412a2a
mov eax, esi
call fcn.00408b50
mov edi, eax
jmp 0x412a2c
xor edi, edi
cmp byte [ebp - 1], 0
je 0x412a56
push 0x413350
push dword [ebx + 0x10]
push 0x413360
push dword [ebx + 0x44]
push 0x413370
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.00403a84
jmp 0x412a78
push 0x41337c
push dword [ebx + 0x10]
push 0x413360
push dword [ebx + 0x44]
push 0x413370
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.00403a84
push dword [ebp - 0x14]
push 0x41338c
push 0x413370
push 0x4133a0
push 0x413370
push 0x4133c0
push dword [ebx + 0x64]
push 0x413370
push dword [ebx + 0x50]
lea eax, [ebp - 0x14]
mov edx, 9
call fcn.00403a84
cmp dword [ebx + 0x68], 0
je 0x412acf
push dword [ebp - 0x14]
push 0x4133d8
push dword [ebx + 0x68]
push 0x413370
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00403a84
cmp dword [ebx + 0x14], 0x50
je 0x412b0d
push dword [ebp - 0x14]
push 0x4133ec
push dword [ebx + 0xc]
push 0x4133fc
lea edx, [ebp - 0x20028]
mov eax, dword [ebx + 0x14]
call fcn.004087fc
push dword [ebp - 0x20028]
push 0x413370
lea eax, [ebp - 0x14]
mov edx, 6
call fcn.00403a84
jmp 0x412b2a
push dword [ebp - 0x14]
push 0x4133ec
push dword [ebx + 0xc]
push 0x413370
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00403a84
cmp dword [ebx + 0x54], 0
je 0x412b74
push dword [ebp - 0x14]
push 0x413408
push dword [ebx + 0x54]
push 0x413370
push 0x413424
push dword [ebx + 0x54]
push 0x413370
push 0x413438
push dword [ebx + 0x54]
push 0x413370
push 0x413448
push dword [ebx + 0x54]
push 0x413370
lea eax, [ebp - 0x14]
mov edx, 0xd
call fcn.00403a84
lea edx, [ebp - 0x2002c]
mov eax, dword [ebx + 0x60]
call fcn.0040a898
cmp dword [ebp - 0x2002c], 0
je 0x412beb
lea eax, [ebp - 0x20038]
mov ecx, 0x413460
mov edx, dword [ebp - 0x14]
call fcn.00403a10
mov edx, dword [ebp - 0x20038]
lea eax, [ebp - 0x20034]
call fcn.00403eb8
push dword [ebp - 0x20034]
lea edx, [ebp - 0x2003c]
mov eax, ebx
call fcn.00412590
push dword [ebp - 0x2003c]
push 0x413470
lea eax, [ebp - 0x20030]
mov edx, 3
call fcn.00403fa8
mov edx, dword [ebp - 0x20030]
lea eax, [ebp - 0x14]
call fcn.004039b0
cmp byte [ebp - 1], 0
je 0x412c58
cmp dword [ebp + 0xc], 0
je 0x412c11
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push 0x413370
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00403a84
jmp 0x412c2b
push dword [ebp - 0x14]
push 0x413480
push 0x413370
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00403a84
push dword [ebp - 0x14]
push 0x4134b8
lea edx, [ebp - 0x20040]
mov eax, edi
call fcn.004087fc
push dword [ebp - 0x20040]
push 0x413370
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00403a84
push dword [ebp - 0x14]
push 0x4134d4
push 0x4134f4
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00403a84
lea ecx, [ebp - 0x20]
mov edx, dword [ebx + 0xc]
mov eax, ebx
call fcn.00411c24
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
cmp dword [ebp - 0x20], 0
je 0x412caf
mov ecx, dword [ebx + 0x14]
mov edx, dword [ebp - 0x20]
mov eax, ebx
call fcn.00412138
test al, al
jne 0x412cc2
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xffffffff
jmp 0x4132b8
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
lea eax, [ebp - 0x20024]
xor ecx, ecx
mov edx, 0x10000
call fcn.004027ac
mov eax, dword [ebp - 0x14]
call fcn.00403bc4
mov edx, eax
lea eax, [ebp - 0x20024]
call fcn.00405edc
mov eax, dword [ebp - 0x14]
call fcn.004039c4
mov edi, eax
push 0
push edi
lea eax, [ebp - 0x20024]
push eax
mov eax, dword [ebx + 8]
push eax
call sub.wsock32.dll_send
mov dword [ebp - 0x1c], eax
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
cmp edi, dword [ebp - 0x1c]
je 0x412d60
lea eax, [ebx + 4]
mov edx, 0x413504
call fcn.00403788
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xfffffffe
jmp 0x4132b8
cmp byte [ebp - 1], 0
je 0x412e1e
test esi, esi
je 0x412e1e
mov eax, esi
call fcn.00408b50
test eax, eax
jbe 0x412e1e
mov eax, esi
xor edx, edx
call fcn.00406454
jmp 0x412e06
lea eax, [ebp - 0x20024]
xor ecx, ecx
mov edx, 0x10000
call fcn.004027ac
lea edx, [ebp - 0x20024]
mov eax, esi
mov ecx, 0x10000
call fcn.00408b58
mov edi, eax
push 0
push edi
lea eax, [ebp - 0x20024]
push eax
mov eax, dword [ebx + 8]
push eax
call sub.wsock32.dll_send
mov dword [ebp - 0x1c], eax
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
cmp edi, dword [ebp - 0x1c]
je 0x412e06
lea eax, [ebx + 4]
mov edx, 0x413524
call fcn.00403788
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xfffffffe
jmp 0x4132b8
mov eax, esi
call fcn.00408b50
mov edi, eax
mov eax, esi
call fcn.00406448
cmp edi, eax
ja 0x412d8c
cmp byte [0x41b62c], 0
jne 0x412e47
lea eax, [ebx + 4]
mov edx, 0x413540
call fcn.00403788
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xfffffffc
jmp 0x4132b8
xor edi, edi
lea eax, [ebp - 0x10024]
xor ecx, ecx
mov edx, 0x10000
call fcn.004027ac
cmp byte [0x41b62c], 0
jne 0x412e84
lea eax, [ebx + 4]
mov edx, 0x413540
call fcn.00403788
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xfffffffc
jmp 0x4132b8
push 0
push 0x10000
lea eax, [ebp - 0x10024]
push eax
mov eax, dword [ebx + 8]
push eax
call sub.wsock32.dll_recv
mov esi, eax
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
test esi, esi
jle 0x413052
lea eax, [ebp - 0x20044]
lea edx, [ebp - 0x10024]
mov ecx, 0x10000
call fcn.00403998
mov edx, dword [ebp - 0x20044]
mov eax, 0x4134f4
call fcn.00403cac
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jg 0x412f79
cmp byte [0x41b62c], 0
jne 0x412f1a
lea eax, [ebx + 4]
mov edx, 0x413540
call fcn.00403788
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xfffffffc
jmp 0x4132b8
push 0
mov eax, 0x10000
sub eax, esi
push eax
lea eax, [ebp + esi - 0x10024]
push eax
mov eax, dword [ebx + 8]
push eax
call sub.wsock32.dll_recv
add esi, eax
lea eax, [ebp - 0x20048]
lea edx, [ebp - 0x10024]
mov ecx, 0x10000
call fcn.00403998
mov edx, dword [ebp - 0x20048]
mov eax, 0x4134f4
call fcn.00403cac
mov dword [ebp - 0x18], eax
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
add edi, esi
cmp dword [ebp - 0x18], 0
jle 0x413032
add dword [ebp - 0x18], 3
lea eax, [ebx + 0x70]
push eax
lea eax, [ebp - 0x2004c]
lea edx, [ebp - 0x10024]
mov ecx, 0x10000
call fcn.00403998
mov eax, dword [ebp - 0x2004c]
mov ecx, dword [ebp - 0x18]
mov edx, 1
call fcn.00403c24
lea eax, [ebp - 0x20050]
push eax
mov ecx, 3
mov edx, 0xa
mov eax, dword [ebx + 0x70]
call fcn.00403c24
mov eax, dword [ebp - 0x20050]
call fcn.00408864
mov dword [ebx + 0x6c], eax
mov eax, dword [ebx + 0x6c]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x20054]
push eax
xor ecx, ecx
mov edx, 0x413570
mov eax, ebx
call fcn.004126c8
mov edx, dword [ebp - 0x20054]
lea eax, [ebx + 0x78]
call fcn.00403788
lea eax, [ebp - 0x20058]
push eax
xor ecx, ecx
mov edx, 0x413588
mov eax, ebx
call fcn.004126c8
mov edx, dword [ebp - 0x20058]
lea eax, [ebx + 0x74]
call fcn.00403788
mov eax, ebx
call fcn.0041232c
jmp 0x413072
lea eax, [ebx + 4]
mov edx, 0x4135a0
call fcn.00403788
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xfffffffc
jmp 0x4132b8
lea eax, [ebx + 4]
mov edx, 0x4135c0
call fcn.00403788
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xfffffffd
jmp 0x4132b8
cmp dword [ebp + 8], 0
je 0x413080
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], eax
jmp 0x413088
call fcn.00406610
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
xor edx, edx
call fcn.00406454
cmp esi, dword [ebp - 0x18]
jle 0x4130be
call fcn.00406610
mov edx, dword [ebp - 0x18]
lea edx, [ebp + edx - 0x10024]
mov dword [ebp - 0x10], edx
call fcn.004080b4
mov ecx, esi
sub ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
call fcn.00408b5c
cmp dword [ebx + 0x78], 0
jne 0x413232
jmp 0x413179
mov eax, dword [ebx + 0x48]
cmp eax, 0xffffffff
jle 0x4130dd
cmp eax, edi
jle 0x413249
lea eax, [ebp - 0x10024]
xor ecx, ecx
mov edx, 0x10000
call fcn.004027ac
cmp byte [0x41b62c], 0
jne 0x413118
lea eax, [ebx + 4]
mov edx, 0x413540
call fcn.00403788
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xfffffffc
jmp 0x4132b8
push 0
push 0x10000
lea eax, [ebp - 0x10024]
push eax
mov eax, dword [ebx + 8]
push eax
call sub.wsock32.dll_recv
mov esi, eax
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
test esi, esi
jle 0x413179
add edi, esi
lea edx, [ebp - 0x10024]
mov eax, dword [ebp - 0x24]
mov ecx, esi
call fcn.00408b5c
test esi, esi
jg 0x4130cd
jmp 0x413249
mov eax, dword [ebx + 0x48]
cmp eax, 0xffffffff
jle 0x413196
cmp eax, edi
jle 0x413249
lea eax, [ebp - 0x10024]
xor ecx, ecx
mov edx, 0x10000
call fcn.004027ac
cmp byte [0x41b62c], 0
jne 0x4131d1
lea eax, [ebx + 4]
mov edx, 0x413540
call fcn.00403788
mov eax, ebx
call fcn.00412310
mov dword [ebp - 0xc], 0xfffffffc
jmp 0x4132b8
push 0
push 0x10000
lea eax, [ebp - 0x10024]
push eax
mov eax, dword [ebx + 8]
push eax
call sub.wsock32.dll_recv
mov esi, eax
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
test esi, esi
jle 0x413232
add edi, esi
lea edx, [ebp - 0x10024]
mov eax, dword [ebp - 0x24]
mov ecx, esi
call fcn.00408b5c
test esi, esi
jle 0x413249
mov eax, dword [ebx + 0x78]
call fcn.00408864
add eax, dword [ebp - 0x18]
cmp edi, eax
jl 0x413186
mov eax, dword [ebp - 0x24]
xor edx, edx
call fcn.00406454
mov eax, dword [ebp - 0x24]
call fcn.00408b50
mov edx, eax
lea ecx, [ebp - 0x2005c]
mov eax, dword [ebp - 0x24]
call fcn.004064c8
mov edx, dword [ebp - 0x2005c]
lea eax, [ebx + 0x7c]
call fcn.00403eb8
mov eax, dword [ebp - 0x24]
xor edx, edx
call fcn.00406454
cmp dword [ebp + 8], 0
jne 0x413291
mov eax, dword [ebp - 0x24]
call fcn.004080b4
mov eax, ebx
call fcn.00412310
push 0
push 0
push 0x406
mov eax, dword [0x41b878]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
push eax
call sub.user32.dll_SendMessageA_1
mov dword [ebx + 0x48], 0xffffffff
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41333b
lea eax, [ebp - 0x2005c]
mov edx, 8
call fcn.00403758
lea eax, [ebp - 0x2003c]
call fcn.00403d88
lea eax, [ebp - 0x20038]
call fcn.00403734
lea eax, [ebp - 0x20034]
mov edx, 2
call fcn.00403da0
lea eax, [ebp - 0x2002c]
mov edx, 2
call fcn.00403758
lea eax, [ebp - 0x20]
call fcn.00403734
lea eax, [ebp - 0x14]
call fcn.00403734
lea eax, [ebp - 8]
call fcn.00403734
lea eax, [ebp + 0xc]
call fcn.00403734
lea eax, [ebp + 0x14]
call fcn.00403734
ret