Function at 0x401000
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_getenv]
push esi
push edi
xor eax, eax
push 0x405010
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
call ebx
mov esi, dword [sym.imp.MSVCRT.dll_printf]
pop ecx
test eax, eax
je 0x401041
push 0x405028
mov byte [0x406356], 1
call esi
pop ecx
mov edi, 0x104
lea eax, [ebp - 0x22c]
push edi
push eax
call fcn.00402872
pop ecx
test al, al
pop ecx
jne 0x401076
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x405048
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
push 2
jmp 0x401235
lea eax, [ebp - 0x22c]
push eax
call fcn.0040239b
cmp eax, 1
pop ecx
jge 0x4010a6
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x40507c
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
push 1
call dword [sym.imp.MSVCRT.dll_exit]
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00401536
and byte [ebp - 0x128], 0
lea ecx, [ebp - 0x128]
push edi
push ecx
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0x22c]
push eax
call fcn.0040293a
add esp, 0x18
test al, al
jne 0x401101
lea eax, [ebp - 0x128]
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push dword [ebp - 0x14]
add eax, 0x40
push 0x4050b4
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x10
push 4
jmp 0x401235
and dword [ebp - 0x24], 0
and dword [ebp - 0x20], 0
cmp byte [0x406356], 0
je 0x40111e
call fcn.00402d01
mov edi, eax
mov dword [ebp - 0x14], edx
jmp 0x401121
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x128]
push eax
call fcn.004029a3
pop ecx
test al, al
pop ecx
jne 0x401148
mov dword [0x406358], 1
push 6
jmp 0x401235
cmp byte [0x406356], 0
je 0x40116d
call fcn.00402d01
sub eax, edi
sbb edx, dword [ebp - 0x14]
push edx
push eax
call fcn.00402d47
push eax
push 0x4050d4
call esi
add esp, 0x10
add dword [ebp + 0xc], 4
dec dword [ebp + 8]
push 0x405100
mov dword [0x406348], 0x4050f8
call ebx
xor ebx, ebx
pop ecx
cmp eax, ebx
jne 0x401191
mov eax, 0x40510c
push eax
call fcn.0040179d
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0040187d
add esp, 0x18
test al, al
jne 0x4011c6
mov dword [0x406358], 2
jmp 0x40152e
cmp dword [ebp - 0xc], ebx
je 0x4011d4
push dword [ebp - 0xc]
call fcn.0040179d
pop ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0xc]
push dword [ebp - 8]
call fcn.004020d0
add esp, 0x10
cmp byte [0x406356], 0
je 0x4011fb
call fcn.00402d01
mov edi, eax
mov dword [ebp - 0x14], edx
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00401c82
add esp, 0xc
test al, al
jne 0x40123b
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x405110
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
mov dword [0x406358], 3
pop ecx
push 1
pop eax
jmp 0x401531
cmp byte [0x406354], 0
jne 0x40124d
cmp byte [0x406355], 0
je 0x401296
push dword [ebp - 4]
call fcn.004021dc
mov eax, dword [ebp - 4]
pop ecx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
test eax, eax
jne 0x4014f1
cmp byte [0x406354], al
je 0x401277
mov dword [ebp - 0x10], ebx
jmp 0x401525
cmp byte [0x406355], 0
je 0x401296
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x40513c
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
cmp dword [ebp - 0xc], ebx
jne 0x4012aa
cmp dword [ebp - 8], ebx
jne 0x4012aa
call fcn.0040221c
jmp 0x401525
call fcn.0040282a
cmp byte [0x406356], 0
je 0x40131d
call fcn.00402d01
sub eax, edi
sbb edx, dword [ebp - 0x14]
push edx
push eax
call fcn.00402d47
push eax
push 0x405140
call esi
add esp, 0x10
cmp byte [0x406356], 0
je 0x40131d
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4012e9
mov eax, 0x406368
push eax
push 0x405164
call esi
push dword [ebp + 8]
push 0x405178
call esi
add esp, 0x10
cmp dword [ebp + 8], 0
jle 0x40131b
mov eax, dword [ebp + 0xc]
push dword [eax + ebx*4]
push ebx
push 0x40518c
call esi
add esp, 0xc
inc ebx
cmp ebx, dword [ebp + 8]
jl 0x401304
xor ebx, ebx
push 1
pop edi
push dword [ebp - 4]
mov dword [ebp - 0x10], edi
call fcn.00401d67
cmp dword [ebp - 0xc], ebx
pop ecx
je 0x40135f
push dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.00401fbb
pop ecx
mov esi, eax
mov eax, dword [ebp - 4]
pop ecx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
test eax, eax
jne 0x4014f1
cmp esi, ebx
jne 0x401391
push dword [ebp - 0xc]
push 0x4051a4
jmp 0x40137a
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.00401df0
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
jne 0x401391
push dword [ebp - 8]
push 0x4051dc
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
jmp 0x401525
mov eax, dword [ebp - 4]
push ebx
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2a4]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x4014f1
push eax
push dword [ebp - 4]
call fcn.00401f21
pop ecx
mov ebx, eax
mov eax, dword [ebp - 4]
pop ecx
push dword [ebp - 8]
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x2a8]
mov eax, dword [ebp - 4]
test ebx, ebx
mov ecx, dword [eax]
jne 0x4013e3
push eax
call dword [ecx + 0x40]
mov dword [0x406358], 4
jmp 0x401525
push 0x4051fc
push 0x405214
push ebx
push eax
call dword [ecx + 0x1c4]
mov dword [ebp - 0x14], eax
test eax, eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
jne 0x401439
push eax
call dword [ecx + 0x3c]
test eax, eax
je 0x401414
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
jmp 0x40142a
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x40521c
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
mov dword [0x406358], 5
jmp 0x401525
push edi
push dword [ebp - 0x14]
push ebx
push eax
call dword [ecx + 0x24]
mov edi, eax
mov eax, dword [ebp - 4]
push 0x405248
push 0x40524c
mov esi, dword [eax]
push edi
push eax
call dword [esi + 0x7c]
push eax
push dword [ebp - 4]
call dword [esi + 0x84]
mov esi, eax
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
test eax, eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
je 0x401489
push eax
call dword [ecx + 0x40]
mov dword [0x406358], 6
jmp 0x401525
push esi
push edi
push eax
call dword [ecx + 0xc4]
add esp, 0xc
test al, 1
jne 0x4014bb
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x40525c
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
mov dword [0x406358], 8
pop ecx
jmp 0x401525
push dword [ebp + 8]
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.00401ea4
add esp, 0xc
test eax, eax
je 0x4014f1
mov ecx, dword [ebp - 4]
push eax
push dword [ebp - 0x14]
mov edx, dword [ecx]
push ebx
push ecx
call dword [edx + 0x234]
mov eax, dword [ebp - 4]
add esp, 0x10
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
test eax, eax
je 0x4014fc
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
jmp 0x401525
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
test eax, eax
je 0x401521
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x405278
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
jmp 0x401525
and dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret