Function at 0x40c058
Capabilities:
Packed with generic packer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
jmp 0x40c09d
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
pushal
mov eax, 1
mov eax, 2
mov eax, 4
mov eax, 2
mov eax, 5
mov eax, 4
mov eax, 2
mov eax, 5
mov eax, 6
popal
fninit
mov dword [ebp - 0x1c], esp
push 0
xor eax, eax
call dword [0x4d262a]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x40c108
push 0x52
push 0x403723b
push 6
call fcn.004b91a6
add esp, 0xc
cmp dword [0x4d2396], 0
je 0x40c129
cmp dword [0x4d22be], 0
jne 0x40c129
mov eax, 1
jmp 0x40c12e
mov eax, 0
test eax, eax
je 0x40c17c
push 0x80000301
push 0
push dword [0x4d2396]
push 1
mov ebx, 0x198
call fcn.004bb0a0
add esp, 0x10
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040bedf
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40c174
push ebx
call fcn.004b91a0
add esp, 4
mov eax, dword [ebp - 0x20]
jmp 0x40c90a
push 0x80000301
push 0
push dword [0x4d22b6]
push 0x80000301
push 0
push 1
push 2
mov ebx, 0xc4
call fcn.004ba9e0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 1
je 0x40c1c5
cmp dword [0x4d22b6], 0xffffffff
je 0x40c1c5
xor eax, eax
jmp 0x40c1ca
mov eax, 1
test eax, eax
je 0x40c218
call fcn.0040c960
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.00401f52
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40c200
push ebx
call fcn.004b91a0
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c214
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4d22b6]
push 0x80000301
push 0
push 2
push 2
mov ebx, 0xc4
call fcn.004ba9e0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 2
je 0x40c261
cmp dword [0x4d22b6], 0xffffffff
je 0x40c261
xor eax, eax
jmp 0x40c266
mov eax, 1
test eax, eax
je 0x40c2b4
call fcn.0040ca2f
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.00401f52
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40c29c
push ebx
call fcn.004b91a0
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c2b0
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4d22b6]
push 0x80000301
push 0
push 4
push 2
mov ebx, 0xc4
call fcn.004ba9e0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 4
je 0x40c2fd
cmp dword [0x4d22b6], 0xffffffff
je 0x40c2fd
xor eax, eax
jmp 0x40c302
mov eax, 1
test eax, eax
je 0x40c350
call fcn.0040ccb2
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.00401f52
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40c338
push ebx
call fcn.004b91a0
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c34c
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4d22b6]
push 0x80000301
push 0
push 8
push 2
mov ebx, 0xc4
call fcn.004ba9e0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 8
je 0x40c399
cmp dword [0x4d22b6], 0xffffffff
je 0x40c399
xor eax, eax
jmp 0x40c39e
mov eax, 1
test eax, eax
je 0x40c3ec
call fcn.0040cd84
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.00401f52
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40c3d4
push ebx
call fcn.004b91a0
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c3e8
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4d22b6]
push 0x80000301
push 0
push 0x10
push 2
mov ebx, 0xc4
call fcn.004ba9e0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x10
je 0x40c435
cmp dword [0x4d22b6], 0xffffffff
je 0x40c435
xor eax, eax
jmp 0x40c43a
mov eax, 1
test eax, eax
je 0x40c4a2
call fcn.0040d0a0
push 0x80000301
push 0
push eax
push 1
mov ebx, 0x168
call fcn.004b9f30
add esp, 0x10
mov dword [ebp - 0x20], eax
push dword [ebp - 0x20]
push dword [ebp - 4]
mov ecx, 2
call fcn.00401f52
add esp, 8
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x40c48a
push ebx
call fcn.004b91a0
add esp, 4
mov eax, dword [ebp - 0x24]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c49e
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4d22b6]
push 0x80000301
push 0
push 0x20
push 2
mov ebx, 0xc4
call fcn.004ba9e0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x20
je 0x40c4eb
cmp dword [0x4d22b6], 0xffffffff
je 0x40c4eb
xor eax, eax
jmp 0x40c4f0
mov eax, 1
test eax, eax
je 0x40c53e
call fcn.0040d117
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.00401f52
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40c526
push ebx
call fcn.004b91a0
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c53a
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4d22b6]
push 0x80000301
push 0
push 0x40
push 2
mov ebx, 0xc4
call fcn.004ba9e0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x40
je 0x40c587
cmp dword [0x4d22b6], 0xffffffff
je 0x40c587
xor eax, eax
jmp 0x40c58c
mov eax, 1
test eax, eax
je 0x40c5da
call fcn.0040d851
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.00401f52
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40c5c2
push ebx
call fcn.004b91a0
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c5d6
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4d22b6]
push 0x80000301
push 0
push 0x80
push 2
mov ebx, 0xc4
call fcn.004ba9e0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x80
je 0x40c626
cmp dword [0x4d22b6], 0xffffffff
je 0x40c626
xor eax, eax
jmp 0x40c62b
mov eax, 1
test eax, eax
je 0x40c67d
push 1
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 8]
push eax
call fcn.0040ea35
test eax, eax
je 0x40c67d
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp - 4]
mov ecx, 3
call fcn.00401f52
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c679
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 4], eax
push dword [0x4d22ba]
push dword [ebp - 4]
mov ecx, 2
call fcn.00401f52
add esp, 8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c6aa
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 4], eax
push reloc.WS2_32.dll_connect
push 0
mov eax, dword [ebp - 4]
test eax, eax
jne 0x40c6c1
mov eax, 0x4ca20b
push eax
push 1
mov ebx, 0x130
call fcn.004bb170
add esp, 0x10
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40c750
mov dword [ebp - 0x1c], esp
push 0x1388
push 0
push 0x10
push 0x4cab2d
push 0x4cab38
push 0
xor eax, eax
call dword [0x4d264e]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x40c728
push 0x8d8
push 0x403723b
push 6
call fcn.004b91a6
add esp, 0xc
push 0
call fcn.004b9182
add esp, 4
cmp dword [ebp - 0x10], 0
jne 0x40c750
push 0
mov ebx, 0x350
call fcn.004bab10
add esp, 4
jmp 0x40c732
push reloc.WS2_32.dll_connect
push 0
mov eax, dword [ebp - 4]
test eax, eax
jne 0x40c763
mov eax, 0x4ca20b
push eax
push 1
mov ebx, 0x198
call fcn.004bb0a0
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x40c78d
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040be48
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x40c7b1
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
call fcn.00401259
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40c7e1
call fcn.00410931
mov dword [ebp - 0x1c], 0
push 0
push dword [ebp - 0x1c]
call fcn.00410e58
lea eax, [ebp - 0x18]
push eax
call fcn.004047f3
mov dword [ebp - 0x1c], eax
push 0
push 0
push 0
push 0x80000301
push 0
push 3
push reloc.WS2_32.dll_getpeername
push 0
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x40c812
mov eax, 0x4ca252
push eax
push 3
mov ebx, 0x19c
call fcn.004bb620
add esp, 0x28
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], ecx
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40c83e
push ebx
call fcn.004b91a0
add esp, 4
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
cmp ecx, 0x80000101
jne 0x40c856
and eax, 0xff
jmp 0x40c8ab
cmp ecx, 0x80000201
jne 0x40c861
cwde
jmp 0x40c8ab
cmp ecx, 0x80000301
je 0x40c8ab
cmp ecx, 0x80000401
je 0x40c8ab
mov dword [ebp - 0x30], eax
cmp ecx, 0x80000501
je 0x40c89b
cmp ecx, 0x80000601
je 0x40c8a0
push 0xaa7
push 0x403723b
push 2
call fcn.004b91a6
add esp, 0xc
fld dword [ebp - 0x30]
jmp 0x40c8a6
mov dword [ebp - 0x2c], edx
fld qword [ebp - 0x30]
call fcn.00402005
mov dword [0x4d2396], eax
mov dword [0x4d22be], 0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40c8d6
push eax
mov ebx, eax
call fcn.00401354
inc eax
push eax
call fcn.004b919a
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x40c90a
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40c91b
push ebx
call fcn.004b91a0
add esp, 4
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x40c92b
push ebx
call fcn.004b91a0
add esp, 4
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x40c93b
push ebx
call fcn.004b91a0
add esp, 4
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x40c94b
push ebx
call fcn.004b91a0
add esp, 4
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x40c95b
push ebx
call fcn.004b91a0
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret