Function at 0x401000
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [ebp + 8]
and byte [ebp - 0x14], 0
push ebx
push esi
lea eax, [eax*4 + 4]
push edi
xor esi, esi
push eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 8], 0x404010
call fcn.00401d09
pop ecx
mov ebx, eax
mov ecx, dword [ebp + 8]
xor eax, eax
inc ecx
test ecx, ecx
jle 0x401057
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + eax*4]
mov dword [ebx + eax*4], ecx
mov ecx, dword [ebp + 8]
inc eax
inc ecx
cmp eax, ecx
jl 0x401045
mov edi, dword [sym.imp.MSVCRT.dll_getenv]
push 0x404040
call edi
mov esi, dword [sym.imp.MSVCRT.dll_printf]
pop ecx
test eax, eax
je 0x40107e
push 0x404058
mov byte [0x4052b2], 1
call esi
pop ecx
lea eax, [ebp - 0x28]
push ebx
push eax
mov eax, 0x104
lea ecx, [ebp - 0x134]
push eax
push ecx
push eax
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00402790
and dword [ebp - 0x30], 0
and dword [ebp - 0x2c], 0
add esp, 0x20
cmp byte [0x4052b2], 0
je 0x4010c5
call fcn.00402c74
mov ebx, eax
mov dword [ebp - 0x20], edx
jmp 0x4010c8
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x134]
push eax
call fcn.00402995
pop ecx
test al, al
pop ecx
jne 0x4010e6
push 6
call dword [sym.imp.MSVCRT.dll_exit]
cmp byte [0x4052b2], 0
je 0x40110b
call fcn.00402c74
sub eax, ebx
sbb edx, dword [ebp - 0x20]
push edx
push eax
call fcn.00402cba
push eax
push 0x404078
call esi
add esp, 0x10
add dword [ebp + 0xc], 4
dec dword [ebp + 8]
push 0x4040a4
mov dword [0x4052a8], 0x40409c
call edi
xor edi, edi
pop ecx
cmp eax, edi
jne 0x40112f
mov eax, 0x4040b0
push eax
call fcn.00401758
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00401838
add esp, 0x18
test al, al
jne 0x40115e
push dword [ebp - 0x18]
call dword [sym.imp.MSVCRT.dll_exit]
cmp dword [ebp - 0x10], edi
je 0x40116c
push dword [ebp - 0x10]
call fcn.00401758
pop ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
call fcn.00401ff4
add esp, 0x10
cmp byte [0x4052b2], 0
je 0x401193
call fcn.00402c74
mov ebx, eax
mov dword [ebp - 0x20], edx
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00401c48
add esp, 0xc
test al, al
jne 0x4011c1
push 1
push 0x4040b4
call fcn.00402cf8
pop ecx
pop ecx
push 1
call dword [sym.imp.MSVCRT.dll_exit]
cmp byte [0x4052b0], 0
jne 0x4011d3
cmp byte [0x4052b1], 0
je 0x401219
push dword [ebp - 4]
call fcn.00402100
mov eax, dword [ebp - 4]
pop ecx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
test eax, eax
jne 0x401408
cmp byte [0x4052b0], al
je 0x4011fa
mov dword [ebp - 0x18], edi
jmp 0x401228
cmp byte [0x4052b1], 0
je 0x401219
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x4040e0
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
cmp dword [ebp - 0x10], edi
jne 0x401230
cmp dword [ebp - 0xc], edi
jne 0x401230
call fcn.00402140
mov dword [ebp - 8], edi
jmp 0x4014dc
call fcn.00402748
cmp byte [0x4052b2], 0
je 0x4012a1
call fcn.00402c74
sub eax, ebx
sbb edx, dword [ebp - 0x20]
push edx
push eax
call fcn.00402cba
push eax
push 0x4040e4
call esi
add esp, 0x10
cmp byte [0x4052b2], 0
je 0x4012a1
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x40126f
mov eax, 0x4052c0
push eax
push 0x404108
call esi
push dword [ebp + 8]
push 0x40411c
call esi
add esp, 0x10
cmp dword [ebp + 8], 0
jle 0x4012a1
mov eax, dword [ebp + 0xc]
push dword [eax + edi*4]
push edi
push 0x404130
call esi
add esp, 0xc
inc edi
cmp edi, dword [ebp + 8]
jl 0x40128a
push 1
xor ebx, ebx
cmp dword [ebp - 0x10], ebx
pop edi
mov dword [ebp - 0x18], edi
je 0x401353
push dword [ebp - 0x10]
push dword [ebp - 4]
call fcn.00401edf
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 0x401408
cmp esi, ebx
jne 0x401310
mov edi, dword [ebp - 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, 0x404148
mov edx, ecx
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add edx, ecx
push edx
call fcn.00401d09
push dword [ebp - 0x10]
mov dword [ebp - 8], eax
push esi
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
jmp 0x4014ce
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 - 0xc], eax
je 0x401408
push eax
push dword [ebp - 4]
call fcn.00401e45
pop ecx
mov ebx, eax
mov eax, dword [ebp - 4]
pop ecx
test ebx, ebx
mov ecx, dword [eax]
jne 0x4013d2
push eax
call dword [ecx + 0x40]
mov dword [ebp - 8], 0x404180
jmp 0x4014dc
push dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.00401d2d
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
jne 0x401397
mov edi, dword [ebp - 0xc]
or ecx, 0xffffffff
xor eax, eax
mov esi, 0x4041b4
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, esi
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add edx, ecx
push edx
call fcn.00401d09
push dword [ebp - 0xc]
mov dword [ebp - 8], eax
jmp 0x401300
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 - 0xc], eax
je 0x401408
push eax
push dword [ebp - 4]
call fcn.00401e45
pop ecx
mov ebx, eax
mov eax, dword [ebp - 4]
pop ecx
test ebx, ebx
mov ecx, dword [eax]
jne 0x4013d2
push eax
call dword [ecx + 0x40]
mov dword [ebp - 8], 0x4041d4
jmp 0x4014dc
push dword [ebp - 0xc]
push esi
push eax
call dword [ecx + 0x2a8]
mov eax, dword [ebp - 4]
push 0x404208
push 0x404220
push ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c4]
mov dword [ebp - 0x20], eax
test eax, eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
jne 0x401422
push eax
call dword [ecx + 0x3c]
test eax, eax
je 0x401416
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x40]
jmp 0x4014dc
mov dword [ebp - 8], 0x404228
jmp 0x4014ce
push edi
push dword [ebp - 0x20]
push ebx
push eax
call dword [ecx + 0x24]
mov edi, eax
mov eax, dword [ebp - 4]
test edi, edi
je 0x40140b
mov esi, dword [eax]
push 0x404254
push 0x404258
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]
jne 0x40140d
push esi
push edi
push eax
call dword [ecx + 0xc4]
add esp, 0xc
test al, 1
jne 0x40147c
mov dword [ebp - 8], 0x404268
jmp 0x4014ce
push dword [ebp + 8]
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.00401dc8
add esp, 0xc
test eax, eax
je 0x401408
mov ecx, dword [ebp - 4]
push eax
push dword [ebp - 0x20]
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
jne 0x401408
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
test eax, eax
je 0x4014d4
mov dword [ebp - 8], 0x404280
mov byte [ebp - 0x14], 1
jmp 0x4014dc
and dword [ebp - 0x18], 0
and dword [ebp - 8], 0
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
cmp dword [ebp - 8], 0
je 0x4014f8
push dword [ebp - 0x14]
push dword [ebp - 8]
call fcn.00402cf8
pop ecx
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.MSVCRT.dll_exit]