Function at 0x40c180
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x42567c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x4284b4]
and eax, 1
jne 0x40c1b7
mov ecx, dword [0x4284b4]
or ecx, 1
mov dword [0x4284b4], ecx
call dword [sym.imp.MSVCR80.dll__getpid]
mov dword [0x4284b0], eax
push 0x404
push 0
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCR80.dll_memset
add esp, 0xc
cmp dword [ebp + 0x10], 0x42e
jne 0x40c203
push 0x400
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR80.dll_strncpy]
add esp, 0xc
mov edx, dword [ebp + 0x14]
push edx
call sub.MSVCR80.dll_strlen
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x400], eax
jmp 0x40c4a7
cmp dword [0x424620], 0xffffffff
jne 0x40c23c
push 0
call fcn.0040c4c0
add esp, 4
and eax, 0xffff
and edx, 0
push eax
call dword [sym.imp.MSVCR80.dll_srand]
add esp, 4
push 0x40
push 0x428470
push 0x424620
call fcn.00412810
add esp, 0xc
cmp dword [0x42461c], 0xffffffff
jne 0x40c35a
call fcn.00412ab0
mov dword [ebp - 0x118], eax
call fcn.00412af0
mov dword [ebp - 0x110], eax
push str.WNC_NUM_CPUS
call dword [sym.imp.MSVCR80.dll_getenv]
add esp, 4
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0
je 0x40c2b2
lea edx, [ebp - 0x114]
push edx
push 0x41f6c4
mov eax, dword [ebp - 0x10c]
push eax
call dword [sym.imp.MSVCR80.dll_sscanf]
add esp, 0xc
mov ecx, dword [ebp - 0x114]
cmp ecx, dword [ebp - 0x118]
jle 0x40c2b2
mov edx, dword [ebp - 0x114]
mov dword [ebp - 0x118], edx
push str.WNC_THIS_CPU
call dword [sym.imp.MSVCR80.dll_getenv]
add esp, 4
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0
je 0x40c2eb
lea eax, [ebp - 0x110]
push eax
push 0x41f6d8
mov ecx, dword [ebp - 0x10c]
push ecx
call dword [sym.imp.MSVCR80.dll_sscanf]
add esp, 0xc
cmp dword [ebp - 0x118], 2
jge 0x40c300
mov dword [ebp - 0x118], 0
jmp 0x40c313
cmp dword [ebp - 0x118], 0x63
jle 0x40c313
mov dword [ebp - 0x118], 0x63
cmp dword [ebp - 0x110], 0
jge 0x40c328
mov dword [ebp - 0x110], 0
jmp 0x40c33b
cmp dword [ebp - 0x110], 0x63
jle 0x40c33b
mov dword [ebp - 0x110], 0x63
mov edx, dword [ebp - 0x110]
imul edx, edx, 0x2710
mov eax, dword [ebp - 0x118]
imul eax, eax, 0x64
lea ecx, [edx + eax + 1]
mov dword [0x42461c], ecx
push 0x100
push 0
lea edx, [ebp - 0x108]
push edx
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x100
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.MSVCR80.dll__getcwd]
add esp, 8
cmp dword [ebp + 8], 0
jg 0x40c393
call fcn.0040ad20
mov dword [ebp + 8], eax
cmp dword [ebp + 8], 0x12c
jge 0x40c429
cmp dword [ebp + 8], 0xc8
jge 0x40c3de
push 0x3a
lea ecx, [ebp - 0x108]
push ecx
call fcn.0040f530
add esp, 8
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
je 0x40c3d2
mov edx, dword [ebp - 0x120]
mov byte [edx], 0x5c
mov dword [ebp - 0x11c], 0x41f658
jmp 0x40c3e8
mov dword [ebp - 0x11c], str._d_ld_d_d_s_s_d_s
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x108]
push edx
push 0x428470
mov eax, dword [0x424620]
push eax
mov ecx, dword [0x42461c]
push ecx
call fcn.00412760
push eax
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x11c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x28
jmp 0x40c47f
mov dword [ebp - 0x124], str._3d_ld_d_d_d_s_s_s_d_s
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.0040b320
push eax
lea ecx, [ebp - 0x108]
push ecx
push 0x428470
mov edx, dword [0x424620]
push edx
mov eax, dword [0x4284b0]
push eax
mov ecx, dword [0x42461c]
push ecx
call fcn.00412760
push eax
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x124]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x30
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCR80.dll_strlen
add esp, 4
add eax, 1
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x400], eax
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00411da0
add esp, 8
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b6f2
mov esp, ebp
pop ebp
ret