Function at 0x403d30
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x17c
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
cmp byte [eax + 0x25], 7
ja case.0x403d4c.0
movzx eax, byte [eax + 0x25]
jmp dword [eax*4 + 0x4115c4]
mov esi, dword [ebp + 8]
mov eax, 1
mov byte [esi + 0x25], 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [edi + 0x1c]
sub esp, 8
mov eax, dword [edi + 0x20]
mov byte [edx + eax], 0
mov ebx, dword [edi + 0x1c]
push 0x411477
push ebx
call sub.ntdll.dll_strstr
add esp, 0x10
test eax, eax
mov esi, eax
je 0x40443b
sub esp, 0xc
lea ebx, [ebp - 0x140]
push ebx
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push str.ORT__d__d__d__d__d__d_r_n_256_
push esi
call sub.msvcrt.dll_sscanf
add esp, 0x30
cmp eax, 5
mov dword [ebp - 0x154], eax
jg 0x40424b
nop
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x30], 0x10
sub esp, 4
mov ebx, dword [ebp + 8]
mov eax, dword [edi + 0x20]
add ebx, 0x3c
push eax
mov esi, dword [edi + 0x1c]
push esi
mov ecx, dword [ebx + 8]
push ecx
call sub.ntdll.dll_memcpy
mov eax, dword [edi + 0x20]
add dword [ebx + 8], eax
mov eax, dword [edi + 0x20]
add dword [ebx + 0xc], eax
mov edx, dword [edi + 0x1c]
mov eax, dword [edi + 0x20]
mov byte [edx + eax], 0
pop eax
mov esi, dword [edi + 0x1c]
pop edx
push 0xd
push esi
call sub.ntdll.dll_strchr
add esp, 0x10
test eax, eax
je 0x404420
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push str._d______d
mov esi, dword [ebx + 0x10]
push esi
call sub.msvcrt.dll_sscanf
add esp, 0x10
cmp eax, 2
je 0x404623
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x10]
push eax
push str._d__d_r_n
mov eax, dword [ebx + 0x10]
push eax
call sub.ntdll.dll_sprintf
mov esi, dword [ebx + 0x10]
add esp, 0x10
mov dword [ebx], eax
mov eax, dword [ebx + 0x10]
mov dword [ebx + 0xc], eax
mov eax, dword [ebx]
add eax, esi
mov dword [ebx + 8], eax
sub esp, 0xc
push edi
call fcn.004092c0
xor eax, eax
add esp, 0x10
jmp 0x403d5f
mov edx, dword [edi + 0x1c]
sub esp, 8
mov eax, dword [edi + 0x20]
mov byte [edx + eax], 0
push 0x411530
mov eax, dword [edi + 0x1c]
push eax
call sub.ntdll.dll_strstr
add esp, 0x10
test eax, eax
mov dword [ebp - 0x150], eax
je 0x403dd0
sub esp, 0xc
lea esi, [ebp - 0x2c]
push esi
lea ebx, [ebp - 0x28]
push ebx
lea eax, [ebp - 0x140]
push eax
push str.DCC_CHAT__256s__u__u
mov eax, dword [ebp - 0x150]
push eax
call sub.msvcrt.dll_sscanf
add esp, 0x20
cmp eax, 3
je 0x404364
sub esp, 8
lea edx, [ebp - 0x10]
push edx
push esi
push ebx
lea ecx, [ebp - 0x140]
push ecx
push str.DCC_SEND__256s__u__u__u
mov eax, dword [ebp - 0x150]
push eax
call sub.msvcrt.dll_sscanf
add esp, 0x20
cmp eax, 4
je 0x40458d
sub esp, 8
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
lea edx, [ebp - 0x140]
push edx
push str.DCC_MOVE__256s__u__u__u
mov eax, dword [ebp - 0x150]
push eax
call sub.msvcrt.dll_sscanf
add esp, 0x20
cmp eax, 4
jne 0x403dd0
movzx eax, word [ebp - 0x2c]
sub esp, 0xc
push eax
call sub.WS2_32.DLL_htons
movzx ebx, ax
mov eax, dword [ebp - 0x28]
push eax
call sub.WS2_32.DLL_htonl
add esp, 0xc
push 0x200
push ebx
push eax
push 0
call fcn.00407f90
add esp, 0x10
test eax, eax
mov dword [ebp - 0x15c], eax
je 0x403dd0
mov ebx, dword [ebp - 0x150]
sub esp, 0xc
mov esi, dword [edi + 0x1c]
sub ebx, esi
mov dword [edi + 0x20], ebx
mov ecx, dword [ebp - 0x15c]
mov esi, dword [ebp - 0x10]
movzx eax, word [ecx + 0x20]
push eax
call sub.WS2_32.DLL_ntohs
movzx eax, ax
mov dword [ebp - 0x170], eax
mov eax, dword [ebp - 0x15c]
mov ecx, dword [eax + 0x18]
push ecx
call sub.WS2_32.DLL_ntohl
sub esp, 8
push 1
push esi
mov edx, dword [ebp - 0x170]
push edx
push eax
lea edx, [ebp - 0x140]
push edx
push str.DCC_MOVE__s__lu__u__u_c_n
mov esi, dword [ebp - 0x150]
push esi
call sub.ntdll.dll_sprintf
add esp, 0x30
add ebx, eax
mov eax, 1
mov dword [edi + 0x20], ebx
jmp 0x403d5f
mov edx, dword [ebp + 8]
mov byte [edx + 0x25], 0
mov dword [ebp - 0x2c], 0
mov eax, dword [edi + 0x20]
dec eax
test eax, eax
jle 0x403dd0
mov ebx, dword [edi + 0x1c]
movzx eax, byte [ebx]
sub al, 0x30
cmp al, 9
ja 0x403dd0
mov esi, dword [edi + 0x20]
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x17c], esi
dec esi
jmp 0x404040
movzx eax, byte [ecx + ebx]
mov edx, ecx
sub al, 0x30
cmp al, 9
ja 0x403dd0
mov eax, dword [ebp - 0x2c]
inc ecx
lea eax, [eax + eax*4]
add eax, eax
cmp esi, ecx
mov dword [ebp - 0x2c], eax
movsx edx, byte [ebx + edx]
lea eax, [eax + edx - 0x30]
mov dword [ebp - 0x2c], eax
jg 0x404030
mov edx, dword [ebp - 0x17c]
cmp byte [ebx + edx - 1], 0
jne 0x403dd0
test eax, eax
je 0x403dd0
sub esp, 0xc
movzx eax, ax
push eax
call sub.WS2_32.DLL_htons
add esp, 0xc
movzx eax, ax
push 0x200
push eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x1c]
push eax
push 0
call fcn.00407f90
add esp, 0x10
test eax, eax
je 0x403dd0
movzx eax, word [eax + 0x20]
sub esp, 0xc
push eax
call sub.WS2_32.DLL_ntohs
sub esp, 8
movzx eax, ax
push eax
push 0x41152d
mov eax, dword [edi + 0x1c]
push eax
call sub.ntdll.dll_sprintf
add esp, 0x20
inc eax
mov dword [edi + 0x20], eax
mov eax, 1
jmp 0x403d5f
mov ecx, dword [edi + 0x1c]
mov edx, dword [0x413068]
mov dword [ebp - 0x16c], ecx
mov ebx, dword [edi + 0x20]
add ecx, ebx
lea esi, [esi]
cmp dword [ebp - 0x16c], ecx
jae 0x404410
cmp edx, 6
mov byte [ebp - 0x40], 0x50
mov byte [ebp - 0x3f], 0x4e
mov byte [ebp - 0x3e], 0x41
mov byte [ebp - 0x3d], 0
ja case.default.0x404115
jmp dword [edx*4 + 0x4115e4]
mov esi, dword [ebp - 0x16c]
movzx eax, byte [esi]
cmp al, 0x50
je 0x404404
inc dword [ebp - 0x16c]
cmp al, byte [ebp - 0x3f]
je 0x404152
xor edx, edx
jmp 0x4040f0
mov ebx, dword [ebp - 0x16c]
movzx eax, byte [ebx]
inc ebx
mov dword [ebp - 0x16c], ebx
cmp al, byte [ebp + edx - 0x40]
jne 0x404138
inc edx
jmp 0x4040f0
inc dword [ebp - 0x16c]
inc edx
jmp 0x4040f0
mov eax, dword [ebp - 0x16c]
cmp byte [eax + 1], 2
je 0x4043f5
add dword [ebp - 0x16c], 4
inc edx
jmp 0x4040f0
mov dword [0x413068], edx
mov edx, dword [ebp - 0x16c]
movzx eax, byte [edx]
movzx edx, byte [edx + 1]
shl eax, 8
add eax, edx
cmp eax, 0x1b39
mov dword [ebp - 0x2c], eax
jbe 0x404357
mov eax, dword [ebp - 0x2c]
sub eax, 0x1b3a
cmp eax, 0xc8
ja 0x403dd0
mov edx, 0x1b3a
mov edi, 0x1b3a
mov dword [ebp - 0x164], edx
jmp 0x4041e1
mov eax, dword [ebp - 0x164]
inc edi
inc eax
movzx eax, ax
cmp ax, 0x1b9f
mov dword [ebp - 0x164], eax
je 0x4046e0
movzx eax, word [ebp - 0x2c]
sub esp, 0xc
push eax
call sub.WS2_32.DLL_htons
mov ecx, dword [ebp + 8]
mov ebx, dword [ecx + 0x1c]
push edi
movzx esi, ax
call sub.WS2_32.DLL_htons
add esp, 0xc
movzx eax, ax
push 0x200
push esi
push ebx
push eax
call fcn.00405d60
add esp, 0x10
test eax, eax
je 0x4041c6
mov edx, dword [ebp - 0x164]
movzx eax, byte [ebp - 0x164]
shr edx, 8
mov ebx, dword [ebp - 0x16c]
mov byte [ebx + 1], al
xor eax, eax
mov byte [ebx], dl
mov dword [0x413068], eax
mov eax, 1
jmp 0x403d5f
xor edx, edx
inc edx
jmp 0x4040f0
mov eax, dword [ebp - 0x10]
sub esp, 0xc
mov edx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
shl eax, 0x18
shl edx, 0x10
or eax, edx
or eax, ebx
shl ecx, 8
or ecx, eax
push ecx
call sub.WS2_32.DLL_htonl
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
shl eax, 8
or eax, edx
movzx eax, ax
push eax
call sub.WS2_32.DLL_htons
add esp, 0xc
movzx eax, ax
mov dword [ebp - 0x2c], eax
push 0x200
push eax
mov ebx, dword [ebp - 0x28]
push ebx
push 0
call fcn.00407f90
add esp, 0x10
test eax, eax
mov ebx, eax
je 0x403dd0
movzx eax, word [eax + 0x20]
sub esp, 0xc
push eax
call sub.WS2_32.DLL_ntohs
movzx eax, ax
mov dword [ebp - 0x24], eax
shr eax, 8
and dword [ebp - 0x24], 0xff
mov dword [ebp - 0x20], eax
mov ecx, dword [ebx + 0x18]
mov ebx, esi
push ecx
call sub.WS2_32.DLL_ntohl
mov edx, eax
add esp, 0xc
shr edx, 0x18
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], edx
mov edx, eax
movzx eax, ah
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp - 0x28]
shr edx, 0x10
and edx, 0xff
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x140]
mov edx, dword [edi + 0x1c]
sub ebx, edx
mov dword [edi + 0x20], ebx
cmp dword [ebp - 0x154], 7
je 0x40431d
mov eax, 0x41149c
sub esp, 0xc
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x10]
push eax
push str.ORT__d__d__d__d__d__d_r_n_s
push esi
call sub.ntdll.dll_sprintf
add esp, 0x30
lea eax, [ebx + eax]
mov dword [edi + 0x20], eax
mov eax, 1
jmp 0x403d5f
add eax, 0x100
mov dword [ebp - 0x2c], eax
jmp 0x4041a1
movzx eax, word [ebp - 0x2c]
sub esp, 0xc
push eax
call sub.WS2_32.DLL_htons
movzx ebx, ax
mov eax, dword [ebp - 0x28]
push eax
call sub.WS2_32.DLL_htonl
add esp, 0xc
push 0x200
push ebx
push eax
push 0
call fcn.00407f90
add esp, 0x10
test eax, eax
mov esi, eax
je 0x403dd0
mov ebx, dword [ebp - 0x150]
sub esp, 0xc
mov eax, dword [edi + 0x1c]
sub ebx, eax
mov dword [edi + 0x20], ebx
movzx eax, word [esi + 0x20]
push eax
call sub.WS2_32.DLL_ntohs
movzx eax, ax
mov dword [ebp - 0x178], eax
mov ecx, dword [esi + 0x18]
push ecx
call sub.WS2_32.DLL_ntohl
push 1
mov edx, dword [ebp - 0x178]
push edx
push eax
push str.DCC_CHAT_chat__lu__u_c_n
mov eax, dword [ebp - 0x150]
push eax
call sub.ntdll.dll_sprintf
add esp, 0x20
add ebx, eax
mov eax, 1
mov dword [edi + 0x20], ebx
jmp 0x403d5f
add eax, 8
inc edx
mov dword [ebp - 0x16c], eax
jmp 0x4040f0
inc esi
mov dword [ebp - 0x16c], esi
jmp 0x4040f0
mov eax, 1
mov dword [0x413068], edx
jmp 0x403d5f
sub esp, 8
push 0xa
push esi
call sub.ntdll.dll_strchr
add esp, 0x10
test eax, eax
jne 0x403e2c
jmp 0x403e79
sub esp, 8
push str.27_Entering
push ebx
call sub.ntdll.dll_strstr
add esp, 0x10
test eax, eax
mov esi, eax
je 0x403dd0
sub esp, 0xc
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push str.27_Entering_Passive_Mode___d__d__d__d__d__d__r_n_256_
push esi
call sub.msvcrt.dll_sscanf
add esp, 0x30
cmp eax, 5
mov dword [ebp - 0x168], eax
jle 0x403dd0
mov eax, dword [ebp - 0x10]
sub esp, 0xc
mov edx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
shl eax, 0x18
shl edx, 0x10
or eax, edx
or eax, ebx
shl ecx, 8
or ecx, eax
push ecx
call sub.WS2_32.DLL_htonl
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
shl eax, 8
or eax, ecx
movzx eax, ax
push eax
call sub.WS2_32.DLL_htons
add esp, 0xc
movzx eax, ax
mov dword [ebp - 0x2c], eax
push 0x200
push eax
mov edx, dword [ebp - 0x28]
push edx
push 0
call fcn.00407f90
add esp, 0x10
test eax, eax
mov ebx, eax
je 0x403dd0
movzx eax, word [eax + 0x20]
sub esp, 0xc
push eax
call sub.WS2_32.DLL_ntohs
movzx eax, ax
mov dword [ebp - 0x24], eax
shr eax, 8
and dword [ebp - 0x24], 0xff
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x18]
mov ebx, esi
push eax
call sub.WS2_32.DLL_ntohl
mov edx, eax
add esp, 0xc
shr edx, 0x18
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], edx
mov edx, eax
movzx eax, ah
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp - 0x28]
shr edx, 0x10
and edx, 0xff
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x1c]
sub ebx, eax
mov dword [edi + 0x20], ebx
lea eax, [ebp - 0x140]
cmp dword [ebp - 0x168], 7
je 0x404567
mov eax, 0x41149c
sub esp, 0xc
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x10]
push edx
push str.27_Entering_Passive_Mode___d__d__d__d__d__d__r_n_s
jmp 0x40433e
movzx eax, word [ebp - 0x2c]
sub esp, 0xc
push eax
call sub.WS2_32.DLL_htons
movzx ebx, ax
mov eax, dword [ebp - 0x28]
push eax
call sub.WS2_32.DLL_htonl
add esp, 0xc
push 0x200
push ebx
push eax
push 0
call fcn.00407f90
add esp, 0x10
test eax, eax
mov dword [ebp - 0x158], eax
je 0x403dd0
mov ebx, dword [ebp - 0x150]
sub esp, 0xc
mov esi, dword [edi + 0x1c]
sub ebx, esi
mov dword [edi + 0x20], ebx
mov edx, dword [ebp - 0x158]
mov esi, dword [ebp - 0x10]
movzx eax, word [edx + 0x20]
push eax
call sub.WS2_32.DLL_ntohs
mov ecx, dword [ebp - 0x158]
movzx eax, ax
mov dword [ebp - 0x174], eax
mov ecx, dword [ecx + 0x18]
push ecx
call sub.WS2_32.DLL_ntohl
sub esp, 8
push 1
push esi
mov edx, dword [ebp - 0x174]
lea esi, [ebp - 0x140]
push edx
push eax
push esi
push str.DCC_SEND__s__lu__u__u_c_n
jmp 0x403fd2
movzx eax, word [ebp - 0x10]
sub esp, 0xc
push eax
call sub.WS2_32.DLL_htons
movzx eax, ax
mov dword [ebp - 0x10], eax
movzx eax, word [ebp - 0x14]
push eax
call sub.WS2_32.DLL_htons
mov edx, dword [0x413460]
movzx eax, ax
add esp, 0xc
cmp edx, 0x413460
mov dword [ebp - 0x180], eax
mov dword [ebp - 0x14], eax
je 0x403e4e
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 0x1c]
mov dword [ebp - 0x160], eax
jmp 0x404680
mov edx, dword [edx]
cmp edx, 0x413460
je 0x403e4e
cmp dword [edx + 0x1c], ecx
jne 0x404672
movzx eax, word [edx + 0x22]
cmp dword [ebp - 0x180], eax
jne 0x404672
mov esi, dword [ebp + 8]
mov eax, dword [edx + 0x18]
cmp eax, dword [esi + 0x18]
jne 0x404672
movzx eax, word [edx + 0x20]
cmp eax, dword [ebp - 0x160]
jne 0x404672
sub esp, 4
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x40]
push ecx
mov ecx, dword [edx + 8]
push ecx
call sub.WS2_32.DLL_getsockname
pop edx
test eax, eax
jne 0x403e4e
movzx eax, word [ebp - 0x3e]
sub esp, 0xc
push eax
call sub.WS2_32.DLL_ntohs
movzx eax, ax
add esp, 0xc
mov dword [ebp - 0x14], eax
jmp 0x403e4e
xor edx, edx
xor eax, eax
jmp 0x404227