Function at 0x409540
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x944
mov eax, dword [0x41c050]
xor eax, esp
mov dword [esp + 0x93c], eax
mov eax, dword [esp + 0x94c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x954]
push edi
xor edi, edi
mov dword [esp + 0x34], eax
xor eax, eax
mov ebx, edx
mov ebp, 1
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], 0x19
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], ebp
jmp 0x4095aa
mov esi, dword [esp + 0x958]
lea edx, [esp + 0x38]
push edx
push edi
push edi
lea eax, [esp + 0x4c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x4096dc
lea ecx, [esp + 0x40]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4096ce
push edi
push 0x800
lea edx, [esp + 0x150]
push edx
push esi
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
lea eax, [edi - 1]
cmp eax, 0x7ff
ja 0x409683
push 0xc
call fcn.0040a769
mov esi, eax
add esp, 4
test esi, esi
je 0x409675
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
push edi
mov dword [esi + 8], eax
call fcn.0040a769
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], 0
test eax, eax
je 0x409667
push edi
lea ecx, [esp + 0x14c]
push ecx
push eax
call fcn.0040b850
add esp, 0xc
cmp dword [esp + 0x14], 0
mov dword [esi + 4], edi
jne 0x409657
mov dword [esp + 0x14], esi
mov dword [esp + 0x28], esi
jmp 0x4096e8
mov edx, dword [esp + 0x28]
mov dword [edx + 8], esi
mov dword [esp + 0x28], esi
jmp 0x4096e8
xor ebp, ebp
cmp dword [ebx], ebp
jne 0x4096e8
mov dword [ebx], 0x37
jmp 0x4096e8
xor ebp, ebp
cmp dword [ebx], ebp
jne 0x4096e8
mov dword [ebx], 0x36
jmp 0x4096e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test edi, edi
je 0x409694
cmp edi, 0xffffffff
jne 0x40969c
cmp esi, 0x2733
jne 0x4096b2
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x2c]
inc eax
cmp eax, 0x32
mov dword [esp + 0x2c], eax
jle 0x4096b4
xor ebp, ebp
cmp esi, 0x2733
je 0x4096e8
cmp edi, 0xffffffff
jne 0x4096e8
cmp dword [ebx], 0
jne 0x4096e8
mov dword [ebx], 0x35
jmp 0x4096e8
xor ebp, ebp
cmp dword [ebx], edi
jne 0x4096e8
mov dword [ebx], 0x34
jmp 0x4096e8
xor ebp, ebp
cmp dword [ebx], edi
jne 0x4096e8
mov dword [ebx], 0x33
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp ebp, 1
je 0x4095a3
mov dword [esp + 0x1c], edi
cmp dword [esp + 0x14], edi
je 0x409aca
mov esi, dword [esp + 0x14]
xor ebx, ebx
mov eax, esi
xor ebp, ebp
add ebx, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
jne 0x409712
test ebx, ebx
jbe 0x40975f
lea eax, [ebx + 1]
push eax
call fcn.0040a769
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x409755
mov byte [ebx + ebp], 0
xor edi, edi
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push ecx
push edx
lea eax, [edi + ebp]
push eax
call fcn.0040b850
add edi, dword [esi + 4]
mov esi, dword [esi + 8]
add esp, 0xc
test esi, esi
jne 0x409738
mov esi, dword [esp + 0x14]
mov edi, ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebp
mov eax, dword [esi]
mov ebx, esi
test eax, eax
je 0x40977a
push eax
call fcn.0040a6f4
add esp, 4
mov dword [esi], 0
mov esi, dword [esi + 8]
push ebx
call fcn.0040a6f4
add esp, 4
test esi, esi
jne 0x409763
mov dword [esp + 0x14], esi
mov dword [esp + 0x28], esi
cmp ebp, esi
je 0x409ace
push edi
push ebp
call fcn.00409af0
mov dword [esp + 0x38], eax
push ebp
mov eax, edi
call fcn.00409100
add esp, 0xc
mov dword [esp + 0x2c], eax
cmp eax, esi
jne 0x4097ca
mov ecx, dword [esp + 0x24]
cmp dword [ecx], esi
jne 0x4097f8
mov edx, ecx
mov dword [edx], 0x37
jmp 0x4097f8
mov eax, dword [esp + 0x24]
cmp dword [eax], esi
jne 0x4097f8
mov ebx, dword [esp + 0x1c]
mov edi, ebp
call fcn.004091f0
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x4097e7
mov dword [ecx], eax
cmp eax, 0xc8
je 0x4097f8
mov ecx, dword [esp + 0x24]
mov dword [ecx], 0x38
mov esi, dword [esp + 0x1c]
push esi
push ebp
call fcn.00409d40
add esp, 8
cmp eax, 1
jne 0x409924
xor edi, edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], edi
lea esp, [esp]
mov edx, dword [esp + 0x1c]
push eax
sub edx, edi
push edx
lea ecx, [edi + ebp]
lea ebx, [esp + 0x20]
call fcn.00409de0
push 0xc
mov ebx, eax
call fcn.0040a769
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40988e
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
push ebx
mov dword [esi + 8], eax
call fcn.0040a769
add esp, 4
lea ecx, [edi + ebp]
add ecx, dword [esp + 0x18]
push ebx
push ecx
push eax
mov dword [esi], eax
mov dword [esi + 4], ebx
call fcn.0040b850
add esp, 0xc
cmp dword [esp + 0x14], 0
jne 0x409881
mov dword [esp + 0x14], esi
mov dword [esp + 0x28], esi
jmp 0x4098a5
mov edx, dword [esp + 0x28]
mov dword [edx + 8], esi
mov dword [esp + 0x28], esi
jmp 0x4098a5
mov eax, dword [esp + 0x24]
cmp dword [eax], 0
mov dword [esp + 0x20], 1
jne 0x4098a5
mov dword [eax], 0x39
mov eax, dword [esp + 0x18]
lea ecx, [ebx + eax]
add edi, ecx
xor eax, eax
test ebx, ebx
je 0x4098c4
cmp edi, dword [esp + 0x1c]
jae 0x4098c4
cmp dword [esp + 0x20], eax
je 0x409820
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x2c], eax
cmp dword [esp + 0x20], eax
jne 0x4098e9
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
call fcn.00409cd0
add esp, 4
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x14]
test esi, esi
je 0x409918
mov eax, dword [esi]
mov edi, esi
test eax, eax
je 0x409908
push eax
call fcn.0040a6f4
add esp, 4
mov dword [esi], 0
mov esi, dword [esi + 8]
push edi
call fcn.0040a6f4
add esp, 4
test esi, esi
jne 0x4098f1
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x14], 0
cmp dword [esp + 0x30], 1
jne 0x409a4e
lea eax, [esp + 0x20]
push eax
push 0x419d3c
xor ebx, ebx
push 1
push ebx
push 0x419d4c
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
jne 0x409982
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
lea edx, [esp + 0x1c]
push edx
push str.text
push str.gzip
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ebp, eax
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp ebp, ebx
je 0x409992
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x409996
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x1c]
mov edi, eax
mov dword [esp + 0x30], edi
test eax, eax
je 0x4099c4
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push ecx
push eax
mov eax, dword [esp + 0x34]
sub esi, eax
add eax, edx
push esi
push eax
call fcn.00409b90
mov esi, dword [esp + 0x34]
add esp, 0x10
mov ebx, eax
jmp 0x4099d3
mov esi, dword [esp + 0x24]
cmp dword [esi], 0
jne 0x4099d3
mov dword [esi], 0x3a
mov eax, dword [esp + 0x18]
push eax
call fcn.0040a6f4
add esp, 4
xor ebp, ebp
cmp ebx, 1
jne 0x4099fc
mov ecx, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x18]
call fcn.00409cd0
add esp, 4
mov ebp, eax
jmp 0x409a07
cmp dword [esi], 0
jne 0x409a07
mov dword [esi], 0x3b
mov esi, dword [esp + 0x14]
test esi, esi
je 0x409a3b
nop
mov eax, dword [esi]
mov edi, esi
test eax, eax
je 0x409a27
push eax
call fcn.0040a6f4
add esp, 4
mov dword [esi], 0
mov esi, dword [esi + 8]
push edi
call fcn.0040a6f4
add esp, 4
test esi, esi
jne 0x409a10
mov edi, dword [esp + 0x30]
test edi, edi
je 0x409a47
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
mov eax, ebp
jmp 0x409ad2
mov eax, dword [esp + 0x18]
test eax, eax
je 0x409ad2
mov ebp, dword [esp + 0x2c]
sub esi, ebp
lea ebx, [esi + 1]
push ebx
call fcn.0040a769
mov edi, eax
add esp, 4
test edi, edi
je 0x409aaa
push ebx
push 0
push edi
call fcn.0040b7d0
mov edx, dword [esp + 0x24]
add esp, 0xc
push esi
add ebp, edx
push ebp
push edi
call fcn.0040b850
mov eax, dword [esp + 0x40]
add esp, 0xc
test eax, eax
je 0x409ab9
mov dword [eax], esi
mov eax, dword [esp + 0x18]
push eax
call fcn.0040a6f4
add esp, 4
mov eax, edi
jmp 0x409ad2
mov eax, dword [esp + 0x24]
cmp dword [eax], 0
jne 0x409ab9
mov dword [eax], 0x3c
mov eax, dword [esp + 0x18]
push eax
call fcn.0040a6f4
add esp, 4
mov eax, edi
jmp 0x409ad2
xor eax, eax
jmp 0x409ad2
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x94c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a6e5
add esp, 0x944
ret