Function at 0x40ca58
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket

Disassembly:
sub esp, 0x44
or dword [esp + 0xc], 0xffffffff
xor eax, eax
push ebx
push ebp
mov bl, al
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], eax
mov ebp, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
mov byte [esp + 0xb], bl
push esi
push edi
test eax, eax
je 0x40ca91
mov ebp, dword [eax]
dec ebp
mov dword [esp + 0x44], ebp
push 0x1cc
push 0x1618
mov esi, 0x1f4
call fcn.00401224
mov dword [esp + 0x28], eax
test eax, eax
je 0x40ce98
add eax, 0x1000
mov dword [esp + 0x3c], eax
add eax, 0x208
cmp dword [esp + 0x68], 0
mov dword [esp + 0x18], eax
lea ecx, [eax + 0x104]
lea esi, [ecx + 0x104]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x30], esi
je 0x40caf0
push dword [esp + 0x68]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
and dword [esp + 0x48], 0
mov edi, dword [esp + 0x60]
mov byte [esi], bl
cmp byte [esi], 0
lea ecx, [esp + 0x20]
push 0x50
push ecx
push eax
mov eax, dword [esp + 0x68]
cmovne eax, esi
push eax
call fcn.0040c76e
push 0x4286f8
push dword [esp + 0x60]
mov esi, eax
call fcn.00406873
test eax, eax
jns 0x40cb3a
test esi, esi
jne 0x40cb3a
test edi, edi
je 0x40cb3a
cmp byte [edi], 0
je 0x40cb3a
inc bl
mov byte [esp + 0x13], bl
test bl, bl
jne 0x40cb46
test esi, esi
je 0x40cd83
cmp dword [esp + 0x58], 0
je 0x40cbdc
test bl, bl
mov ebx, dword [esp + 0x18]
jne 0x40cb89
push dword [esp + 0x6c]
mov eax, dword [esp + 0x30]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
cdq
push edx
push eax
push ecx
push ecx
push esi
push dword [esp + 0x48]
push ebx
push 0xffffffffffffffff
call fcn.0040c5a4
mov esi, eax
test esi, esi
jne 0x40cb8b
mov esi, 0x1f4
jmp 0x40ce9c
mov esi, edi
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0xfff
push eax
push dword [esp + 0x2c]
push dword [esp + 0x70]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push dword [esp + 0x34]
push ebx
push dword [esp + 0x74]
call fcn.0040c92d
cmp byte [esp + 0x13], 0
mov ebx, eax
mov dword [esp + 0x1c], ebx
jne 0x40cbca
push esi
call fcn.00403dae
cmp ebx, 0xffffffff
je 0x40cd8d
mov eax, dword [esp + 0x24]
jmp 0x40cc60
push dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
push ebx
call fcn.0040c885
mov ebx, eax
mov dword [esp + 0x1c], ebx
cmp ebx, 0xffffffff
je 0x40cd8d
push 1
push ebx
call fcn.0040c83d
cmp byte [esp + 0x13], 0
jne 0x40cc2c
push dword [esp + 0x6c]
mov eax, dword [esp + 0x30]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
cdq
push edx
push eax
push ecx
push ecx
push esi
push dword [esp + 0x48]
push dword [esp + 0x44]
push ebx
call fcn.0040c5a4
jmp 0x40cc33
push edi
push ebx
call fcn.0040c6d9
cmp dword [esp + 0x68], 0
je 0x40cc44
push dword [esp + 0x68]
push ebx
call fcn.0040c6d9
push 0x2710
push 0xfff
push dword [esp + 0x30]
push ebx
call fcn.0040c4ff
test eax, eax
jle 0x40cd8d
mov ecx, dword [esp + 0x28]
push 0x104
lea esi, [ecx + 0x1000]
lea ebx, [eax + ecx]
push esi
push ecx
mov dword [esp + 0x5c], ebx
mov byte [ebx], 0
call fcn.00401fc6
push 0
push 1
push esi
mov dword [esp + 0x30], eax
call fcn.00406126
push eax
call fcn.00401643
push 5
push str.HTTP_
push dword [esp + 0x44]
mov esi, eax
call sub.ntdll.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x40ce91
mov eax, dword [esp + 0x24]
cmp byte [eax], 0
je 0x40cd4a
mov edi, dword [esp + 0x3c]
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x4c]
push 0x104
push edi
push eax
call fcn.00401fc6
cmp byte [edi], 0
mov dword [esp + 0x24], eax
je 0x40cd3e
push ebx
push 0x4284f0
push edi
call fcn.004054cb
add esp, 0xc
push 1
push edi
call fcn.00406126
push str.Content_Length:
push ebx
mov dword [esp + 0x48], eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x40cd1a
push eax
push dword [esp + 0x44]
call fcn.00401643
mov dword [esp + 0x34], eax
jmp 0x40cd35
push str.Location:
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x40cd35
push dword [esp + 0x40]
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esp + 0x24]
cmp byte [eax], 0
jne 0x40ccca
mov edi, dword [esp + 0x60]
mov ebx, dword [esp + 0x50]
mov ebp, dword [esp + 0x44]
cmp esi, 0x12e
jne 0x40cda1
mov eax, dword [esp + 0x48]
inc eax
mov dword [esp + 0x48], eax
cmp eax, 0xa
jg 0x40cd97
mov eax, dword [esp + 0x30]
cmp byte [eax], 0
je 0x40cda1
push dword [esp + 0x1c]
call fcn.0040c99b
mov bl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x30]
jmp 0x40cafb
mov esi, 0x190
jmp 0x40ce9c
mov esi, 0x1e4
jmp 0x40ce9c
mov esi, 0x1ec
jmp 0x40ce9c
test edi, edi
je 0x40cea9
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
push 1
push eax
push dword [esp + 0x24]
mov dword [esp + 0x44], eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x24]
sub ebx, eax
test ebx, ebx
jle 0x40cdfc
cmp ebx, ebp
jle 0x40cdef
push ebp
push eax
push edi
call sub.ntdll.dll_memcpy
add esp, 0xc
mov esi, 0x1e5
add edi, ebp
jmp 0x40cea0
push ebx
push eax
push edi
call sub.ntdll.dll_memcpy
add esp, 0xc
jmp 0x40ce10
push 0
push ebp
push edi
push dword [esp + 0x28]
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test ebx, ebx
jle 0x40ce41
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x34]
add edi, ebx
mov dword [esp + 0x68], eax
sub ebp, ebx
mov eax, dword [esp + 0x14]
add eax, ebx
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x40ce36
cmp ecx, eax
je 0x40ce9c
jb 0x40ce75
test ebp, ebp
jne 0x40cdfc
mov esi, 0x1e5
jmp 0x40ce9c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40ce83
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x68]
cmp eax, 0x7530
ja 0x40ce7c
mov ebx, dword [esp + 0x38]
push 0x64
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x40cdfc
mov esi, 0xd2
jmp 0x40ce9c
mov esi, 0x198
jmp 0x40ce9c
cmp dword [esp + 0x34], 0
je 0x40ce9c
mov esi, 0x1e6
jmp 0x40ce9c
mov esi, 0x19c
jmp 0x40ce9c
mov edi, dword [esp + 0x60]
mov ebp, dword [esp + 0x14]
test edi, edi
je 0x40cead
mov byte [edi], 0
jmp 0x40cead
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x64]
test eax, eax
je 0x40ceb7
mov dword [eax], ebp
push dword [esp + 0x1c]
call fcn.0040c99b
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40cecf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x28]
call fcn.00403dae
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 0x18