Function at 0x404090
Capabilities:
Get socket status
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xac
mov esi, dword [ebp + 8]
mov ebx, dword [esi]
mov eax, dword [ebx + 0xcfc]
cmp eax, dword [ebx + 0xd00]
jae 0x404240
movzx edx, byte [eax]
inc eax
mov dword [ebx + 0xcfc], eax
add esp, 0xac
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x50]
xor edi, edi
test eax, eax
je 0x404127
mov eax, dword [ebx + 0x38]
mov edi, 1
dec eax
mov dword [ebx + 0x38], eax
inc eax
jne 0x404127
mov eax, dword [ebx + 0x3c]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x40]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00408a90
test eax, eax
je 0x404127
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x44]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0040d570
or byte [ebx + 2], 4
or byte [ebx], 1
mov dword [ebx + 0x38], 2
movzx eax, byte [esi + 0x5c]
cmp al, 0x55
sete dl
cmp al, 0x44
sete al
or eax, edx
test al, 1
je 0x40414e
mov eax, dword [ebx + 0x58]
mov edi, 1
dec eax
mov dword [ebx + 0x58], eax
inc eax
je 0x40437b
lea edx, [ebp - 0x80]
mov eax, 7
lea esi, [esi]
lea edi, [edi]
mov byte [edx], 0
inc edx
dec eax
jns 0x404160
mov ecx, dword [esi + 0xe8]
mov eax, ecx
shr eax, 5
mov dword [ebp - 0x8c], eax
mov eax, 1
and ecx, 0x1f
mov edx, eax
shl edx, cl
mov ecx, edx
mov edx, dword [ebp - 0x8c]
or dword [ebp + edx*4 - 0x80], ecx
mov ecx, dword [esi + 0xe4]
mov edx, ecx
and ecx, 0x1f
shr edx, 5
shl eax, cl
or dword [ebp + edx*4 - 0x80], eax
mov eax, 0x1388
mov dword [ebp - 0x84], eax
xor eax, eax
cmp word [esi + 0x14], 0
mov dword [ebp - 0x88], eax
je 0x4041d7
movzx eax, byte [ebx]
mov edx, eax
and edx, 1
shr al, 1
or edi, edx
and eax, 1
or edi, eax
lea edx, [ebp - 0x88]
jne 0x4041d9
xor edx, edx
mov dword [esp + 0x10], edx
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
lea eax, [ebp - 0x80]
mov dword [esp + 4], eax
mov eax, dword [esi + 0xf0]
mov dword [esp], eax
call sub.cygwin1.dll_select
test eax, eax
jne 0x4042ad
mov dword [ebx + 0x60], 1
movzx eax, byte [ebx]
test al, 2
jne 0x404355
test al, 1
je 0x404240
movzx eax, byte [ebx + 2]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0040a3b0
mov dword [esp], esi
mov ecx, 1
mov dword [esp + 4], ecx
call fcn.0040da40
lea esi, [esi]
mov eax, dword [ebx + 0x3ac]
cmp dword [ebx + 0x3a8], eax
jae 0x404283
jmp 0x404297
lea eax, [ebp - 0x78]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x7c]
mov dword [esp], eax
call fcn.0041fe83
mov dword [esp], esi
lea edx, [ebp - 0x78]
mov dword [esp + 4], edx
call fcn.00403950
mov eax, dword [ebx + 0xcfc]
cmp eax, dword [ebx + 0xd00]
jb 0x4040b3
mov eax, dword [esi + 0x7c]
mov dword [esp], eax
call fcn.0041ff88
test eax, eax
jne 0x404250
jmp 0x4040ca
mov dword [esp], esi
xor ecx, ecx
xor edx, edx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call fcn.00402210
jmp 0x404283
jle 0x40420d
mov edx, dword [esi + 0xe8]
mov eax, edx
mov ecx, edx
shr eax, 5
and ecx, 0x1f
mov eax, dword [ebp + eax*4 - 0x80]
sar eax, cl
test al, 1
je 0x40420d
lea eax, [ebx + 0xd04]
mov edi, 0x400
mov dword [ebx + 0xd00], eax
mov dword [ebx + 0xcfc], eax
mov dword [esp + 8], edi
mov eax, dword [ebx + 0xd00]
mov dword [esp], edx
mov dword [esp + 4], eax
call sub.cygwin1.dll_read
test eax, eax
jle 0x40432c
add dword [ebx + 0xd00], eax
sub edi, eax
je 0x40433e
mov edx, dword [esi + 0xe8]
mov dword [esp + 8], edi
mov eax, dword [ebx + 0xd00]
mov dword [esp], edx
mov dword [esp + 4], eax
call sub.cygwin1.dll_read
test eax, eax
jg 0x404302
je 0x40433e
jge 0x4043b4
call sub.cygwin1.dll___errno
cmp dword [eax], 0xb
jne 0x4043b4
cmp edi, 0x400
je 0x40420d
mov eax, dword [ebx + 0xcfc]
jmp 0x4040b3
and al, 0xfd
xor edi, edi
mov byte [ebx], al
mov dword [esp], esi
call fcn.0040be10
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.0040bdd0
movzx eax, byte [ebx]
or al, 1
mov byte [ebx], al
jmp 0x404218
mov eax, 1
mov dword [esp + 8], eax
xor eax, eax
cmp byte [esi + 0x5c], 0x55
mov dword [esp], esi
setne al
mov dword [esp + 4], eax
call fcn.00408a90
test eax, eax
je 0x40414e
or byte [ebx + 2], 4
or byte [ebx], 1
mov dword [ebx + 0x58], 2
jmp 0x40414e
call fcn.00405570
mov dword [esp], 1
call sub.cygwin1.dll_exit
lea esi, [esi]
lea edi, [edi]