Function at 0x409818
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 0x40985d
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 [0x4fecfc]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x4098be
push 6
call fcn.0043f1f8
add esp, 4
cmp dword [0x4fea0c], 0
je 0x4098df
cmp dword [0x4fe950], 0
jne 0x4098df
mov eax, 1
jmp 0x4098e4
mov eax, 0
test eax, eax
je 0x409932
push 0x80000301
push 0
push dword [0x4fea0c]
push 1
mov ebx, 0x198
call fcn.004412f0
add esp, 0x10
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040969f
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40992a
push ebx
call fcn.0043f20a
add esp, 4
mov eax, dword [ebp - 0x20]
jmp 0x40a0ac
push 0x80000301
push 0
push dword [0x4fe948]
push 0x80000301
push 0
push 1
push 2
mov ebx, 0xc4
call fcn.004425f0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 1
je 0x40997b
cmp dword [0x4fe948], 0xffffffff
je 0x40997b
xor eax, eax
jmp 0x409980
mov eax, 1
test eax, eax
je 0x4099ce
call fcn.0040a102
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.004027a3
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x4099b6
push ebx
call fcn.0043f20a
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x4099ca
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4fe948]
push 0x80000301
push 0
push 2
push 2
mov ebx, 0xc4
call fcn.004425f0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 2
je 0x409a17
cmp dword [0x4fe948], 0xffffffff
je 0x409a17
xor eax, eax
jmp 0x409a1c
mov eax, 1
test eax, eax
je 0x409a6a
call fcn.0040a1c7
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.004027a3
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x409a52
push ebx
call fcn.0043f20a
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x409a66
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4fe948]
push 0x80000301
push 0
push 4
push 2
mov ebx, 0xc4
call fcn.004425f0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 4
je 0x409ab3
cmp dword [0x4fe948], 0xffffffff
je 0x409ab3
xor eax, eax
jmp 0x409ab8
mov eax, 1
test eax, eax
je 0x409b06
call fcn.0040a440
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.004027a3
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x409aee
push ebx
call fcn.0043f20a
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x409b02
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4fe948]
push 0x80000301
push 0
push 8
push 2
mov ebx, 0xc4
call fcn.004425f0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 8
je 0x409b4f
cmp dword [0x4fe948], 0xffffffff
je 0x409b4f
xor eax, eax
jmp 0x409b54
mov eax, 1
test eax, eax
je 0x409ba2
call fcn.0040a508
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.004027a3
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x409b8a
push ebx
call fcn.0043f20a
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x409b9e
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4fe948]
push 0x80000301
push 0
push 0x10
push 2
mov ebx, 0xc4
call fcn.004425f0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x10
je 0x409beb
cmp dword [0x4fe948], 0xffffffff
je 0x409beb
xor eax, eax
jmp 0x409bf0
mov eax, 1
test eax, eax
je 0x409c58
call fcn.0040a824
push 0x80000301
push 0
push eax
push 1
mov ebx, 0x168
call fcn.00440550
add esp, 0x10
mov dword [ebp - 0x20], eax
push dword [ebp - 0x20]
push dword [ebp - 4]
mov ecx, 2
call fcn.004027a3
add esp, 8
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x409c40
push ebx
call fcn.0043f20a
add esp, 4
mov eax, dword [ebp - 0x24]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x409c54
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4fe948]
push 0x80000301
push 0
push 0x20
push 2
mov ebx, 0xc4
call fcn.004425f0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x20
je 0x409ca1
cmp dword [0x4fe948], 0xffffffff
je 0x409ca1
xor eax, eax
jmp 0x409ca6
mov eax, 1
test eax, eax
je 0x409cf4
call fcn.0040a891
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.004027a3
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x409cdc
push ebx
call fcn.0043f20a
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x409cf0
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4fe948]
push 0x80000301
push 0
push 0x40
push 2
mov ebx, 0xc4
call fcn.004425f0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x40
je 0x409d3d
cmp dword [0x4fe948], 0xffffffff
je 0x409d3d
xor eax, eax
jmp 0x409d42
mov eax, 1
test eax, eax
je 0x409d90
call fcn.0040af8f
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
mov ecx, 2
call fcn.004027a3
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x409d78
push ebx
call fcn.0043f20a
add esp, 4
mov eax, dword [ebp - 0x20]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x409d8c
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4fe948]
push 0x80000301
push 0
push 0x80
push 2
mov ebx, 0xc4
call fcn.004425f0
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x80
je 0x409ddc
cmp dword [0x4fe948], 0xffffffff
je 0x409ddc
xor eax, eax
jmp 0x409de1
mov eax, 1
test eax, eax
je 0x409e33
push 1
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 8]
push eax
call fcn.0040c0bf
test eax, eax
je 0x409e33
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp - 4]
mov ecx, 3
call fcn.004027a3
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x409e2f
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 4], eax
push dword [0x4fe94c]
push dword [ebp - 4]
mov ecx, 2
call fcn.004027a3
add esp, 8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x409e60
push ebx
call fcn.0043f20a
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 0x409e77
mov eax, 0x46430b
push eax
push 1
mov ebx, 0x130
call fcn.004413d0
add esp, 0x10
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x409efc
mov dword [ebp - 0x1c], esp
push 0x1388
push 0
push 0x10
push 0x46492a
push 0x464935
push 0
xor eax, eax
call dword [0x4fed20]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x409ed4
push 6
call fcn.0043f1f8
add esp, 4
push 0
call fcn.0043f1e6
add esp, 4
cmp dword [ebp - 0x10], 0
jne 0x409efc
push 0
mov ebx, 0x350
call fcn.00442610
add esp, 4
jmp 0x409ede
push reloc.WS2_32.dll_connect
push 0
mov eax, dword [ebp - 4]
test eax, eax
jne 0x409f0f
mov eax, 0x46430b
push eax
push 1
mov ebx, 0x198
call fcn.004412f0
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x409f39
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
call fcn.00409608
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x409f5d
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
call fcn.0040123f
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x409f8d
call fcn.0040decb
mov dword [ebp - 0x1c], 0
push 0
push dword [ebp - 0x1c]
call fcn.0040e3d4
lea eax, [ebp - 0x18]
push eax
call fcn.0040219a
mov dword [ebp - 0x1c], eax
push 0
push 0
push 0
push 0x80000301
push 0
push 3
push htons
push 0
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x409fbe
mov eax, 0x46459e
push eax
push 3
mov ebx, 0x19c
call fcn.00441880
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 0x409fea
push ebx
call fcn.0043f20a
add esp, 4
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
cmp ecx, 0x80000101
jne 0x40a002
and eax, 0xff
jmp 0x40a04d
cmp ecx, 0x80000201
jne 0x40a00d
cwde
jmp 0x40a04d
cmp ecx, 0x80000301
je 0x40a04d
cmp ecx, 0x80000401
je 0x40a04d
mov dword [ebp - 0x30], eax
cmp ecx, 0x80000501
je 0x40a03d
cmp ecx, 0x80000601
je 0x40a042
push 2
call fcn.0043f1f8
add esp, 4
fld dword [ebp - 0x30]
jmp 0x40a048
mov dword [ebp - 0x2c], edx
fld qword [ebp - 0x30]
call fcn.004027ff
mov dword [0x4fea0c], eax
mov dword [0x4fe950], 0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40a078
push eax
mov ebx, eax
call fcn.0040133a
inc eax
push eax
call fcn.0043f204
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x40a0ac
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40a0bd
push ebx
call fcn.0043f20a
add esp, 4
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x40a0cd
push ebx
call fcn.0043f20a
add esp, 4
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x40a0dd
push ebx
call fcn.0043f20a
add esp, 4
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x40a0ed
push ebx
call fcn.0043f20a
add esp, 4
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x40a0fd
push ebx
call fcn.0043f20a
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret