Function at 0x401000
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
and byte [ebp - 5], 0
push ebx
push esi
push edi
xor edi, edi
push 0x404010
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.MSVCRT.dll_getenv]
mov ebx, dword [sym.imp.MSVCRT.dll_printf]
pop ecx
test eax, eax
je 0x401043
push 0x404028
mov byte [0x404e2e], 1
call ebx
pop ecx
lea eax, [ebp - 0x234]
push 0x104
push eax
call fcn.00402196
pop ecx
test al, al
pop ecx
jne 0x401077
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x404048
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
push 2
jmp 0x4012a3
lea eax, [ebp - 0x234]
push eax
call fcn.00401f86
mov esi, eax
pop ecx
cmp esi, 1
mov dword [0x404df0], esi
jge 0x401098
push 3
jmp 0x4012a3
cmp dword [ebp + 8], 1
jle 0x4010fd
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 4]
cmp byte [edx], 0x2d
jne 0x4010fd
cmp esi, edi
mov dword [ebp - 0x1c], edi
jle 0x4010fd
mov dword [ebp - 0x18], 0x404dfc
mov eax, dword [ebp - 0x18]
mov edi, edx
mov ecx, dword [eax]
mov bl, byte [edi]
mov al, bl
cmp bl, byte [ecx]
jne 0x4010e0
test al, al
je 0x4010dc
mov bl, byte [edi + 1]
mov al, bl
cmp bl, byte [ecx + 1]
jne 0x4010e0
inc edi
inc edi
inc ecx
inc ecx
test al, al
jne 0x4010be
xor eax, eax
jmp 0x4010e5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401156
inc dword [ebp - 0x1c]
add dword [ebp - 0x18], 4
cmp dword [ebp - 0x1c], esi
jl 0x4010b7
mov ebx, dword [sym.imp.MSVCRT.dll_printf]
xor edi, edi
test esi, esi
jle 0x401139
mov esi, 0x404dfc
mov eax, dword [esi]
lea ecx, [ebp - 0x130]
inc eax
push 0x104
push ecx
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.0040225e
add esp, 0x10
test al, al
jne 0x4011b0
inc edi
add esi, 4
cmp edi, dword [0x404df0]
jl 0x401106
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x40409c
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
push 5
jmp 0x4012a3
and byte [ebp - 0x130], 0
lea eax, [ebp - 0x130]
push 0x104
lea esi, [edx + 1]
push eax
lea eax, [ebp - 0x234]
push esi
push eax
mov byte [ebp - 5], 1
call fcn.0040225e
add esp, 0x10
test al, al
jne 0x4011aa
lea eax, [ebp - 0x130]
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push esi
add eax, 0x40
push 0x40407c
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x10
push 4
jmp 0x4012a3
mov ebx, dword [sym.imp.MSVCRT.dll_printf]
lea eax, [ebp - 0x2c]
xor edi, edi
push eax
lea eax, [ebp - 0x130]
push eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
call fcn.00402290
pop ecx
test al, al
pop ecx
jne 0x4011df
mov dword [0x404e30], 1
push 6
jmp 0x4012a3
add dword [ebp + 0xc], 4
dec dword [ebp + 8]
cmp byte [ebp - 5], 0
mov dword [0x404e24], 0x4040bc
je 0x4011fd
add dword [ebp + 0xc], 4
dec dword [ebp + 8]
push 0x4040c4
call dword [sym.imp.MSVCRT.dll_getenv]
cmp eax, edi
pop ecx
jne 0x401212
mov eax, 0x4040d0
push eax
call fcn.00401509
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.004015e9
add esp, 0x18
test al, al
jne 0x401247
mov dword [0x404e30], 2
jmp 0x401501
cmp dword [ebp - 0xc], edi
je 0x401255
push dword [ebp - 0xc]
call fcn.00401509
pop ecx
cmp byte [0x404e2e], 0
je 0x401269
call fcn.004024f3
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.004019ee
add esp, 0xc
test al, al
jne 0x4012a9
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x4040d4
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
mov dword [0x404e30], 3
pop ecx
push 1
pop eax
jmp 0x401504
cmp byte [0x404e2c], 0
jne 0x4012bb
cmp byte [0x404e2d], 0
je 0x401304
push dword [ebp - 4]
call fcn.00401d9a
mov eax, dword [ebp - 4]
pop ecx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
test eax, eax
jne 0x4014c4
cmp byte [0x404e2c], al
je 0x4012e5
mov dword [ebp - 0x14], edi
jmp 0x4014f8
cmp byte [0x404e2d], 0
je 0x401304
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x404100
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
cmp dword [ebp - 0xc], edi
jne 0x401318
cmp dword [ebp - 0x10], edi
jne 0x401318
call fcn.00401dda
jmp 0x4014f8
call fcn.00402167
cmp byte [0x404e2e], 0
je 0x40138b
call fcn.004024f3
sub eax, dword [ebp - 0x20]
sbb edx, dword [ebp - 0x1c]
push edx
push eax
call fcn.00402539
push eax
push 0x404104
call ebx
add esp, 0x10
cmp byte [0x404e2e], 0
je 0x40138b
mov eax, dword [ebp - 0x10]
xor esi, esi
cmp eax, edi
jne 0x40135a
mov eax, 0x404e38
push eax
push 0x404128
call ebx
push dword [ebp + 8]
push 0x40413c
call ebx
add esp, 0x10
cmp dword [ebp + 8], edi
jle 0x40138b
mov eax, dword [ebp + 0xc]
push dword [eax + esi*4]
push esi
push 0x404150
call ebx
add esp, 0xc
inc esi
cmp esi, dword [ebp + 8]
jl 0x401374
cmp dword [ebp - 0xc], edi
mov dword [ebp - 0x14], 1
je 0x401413
push dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.00401c85
pop ecx
mov edi, eax
mov eax, dword [ebp - 4]
pop ecx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
test eax, eax
jne 0x4014c4
test edi, edi
jne 0x4013da
push dword [ebp - 0xc]
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push 0x404168
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
jmp 0x4014f8
mov eax, dword [ebp - 4]
push 0
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2a4]
test eax, eax
mov dword [ebp - 0x10], eax
je 0x4014c4
push eax
push dword [ebp - 4]
call fcn.00401beb
pop ecx
mov esi, eax
mov eax, dword [ebp - 4]
pop ecx
push dword [ebp - 0x10]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x2a8]
jmp 0x401422
push dword [ebp - 0x10]
push dword [ebp - 4]
call fcn.00401beb
pop ecx
mov esi, eax
pop ecx
mov eax, dword [ebp - 4]
test esi, esi
mov ecx, dword [eax]
jne 0x40143e
push eax
call dword [ecx + 0x40]
mov dword [0x404e30], 4
jmp 0x4014f8
push 0x4041a0
push 0x4041b8
push esi
push eax
call dword [ecx + 0x1c4]
mov edi, eax
test edi, edi
jne 0x401490
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
test eax, eax
je 0x40146e
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
jmp 0x401484
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x4041c0
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
mov dword [0x404e30], 5
jmp 0x4014f8
push dword [ebp + 8]
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.00401ad3
add esp, 0xc
test eax, eax
je 0x4014c4
mov ecx, dword [ebp - 4]
push eax
push edi
push esi
mov edx, dword [ecx]
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 0x4014cf
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
jmp 0x4014f8
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
test eax, eax
je 0x4014f4
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x4041ec
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
pop ecx
pop ecx
jmp 0x4014f8
and dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret