Function at 0x4036a0
Capabilities:
Get common file path
Query environment variable
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x7d0
mov eax, dword [0x408064]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, 0x16f
push ebx
push esi
push edi
mov esi, 0x4014b0
mov dword [ebp - 0x7d0], eax
lea edi, [ebp - 0x7c8]
xor ebx, ebx
rep movsd dword es:[edi], dword [esi]
push 0x401488
mov byte [ebp - 0x7c9], bl
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40370b
push 0x401498
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40370b
push ebx
push ebx
push 1
push ebx
mov ecx, esi
call dword [0x40a194]
call esi
call fcn.00402f3f
push 0x4099a0
mov edi, 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x403748
push 1
call fcn.00406f3b
push eax
push 0x401a6c
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.msvcrt.dll_exit]
push edi
lea eax, [ebp - 0x108]
push ebx
push eax
call sub.msvcrt.dll_memset
push edi
push ebx
push 0x409ac0
call sub.msvcrt.dll_memset
xor esi, esi
add esp, 0x18
inc esi
cmp dword [ebp + 8], esi
jle 0x403a0b
mov edi, dword [ebp - 0x7d0]
mov ecx, dword [edi + esi*4]
mov al, byte [ecx]
cmp al, 0x2d
je 0x403788
cmp al, 0x2f
jne 0x4039fc
mov al, byte [ecx + 1]
cmp al, 0x68
je 0x403a4b
cmp al, 0x48
je 0x403a4b
cmp al, 0x3f
je 0x403a4b
cmp al, 0x66
je 0x4039a6
cmp al, 0x46
je 0x4039a6
cmp al, 0x70
je 0x40396c
cmp al, 0x50
je 0x40396c
cmp al, 0x6f
je 0x4038f4
cmp al, 0x4f
je 0x4038f4
cmp al, 0x73
je 0x4038e5
cmp al, 0x53
je 0x4038e5
cmp al, 0x63
je 0x4038be
cmp al, 0x43
je 0x4038be
cmp al, 0x76
je 0x4038af
cmp al, 0x56
je 0x4038af
cmp al, 0x69
je 0x403854
cmp al, 0x49
je 0x403854
cmp al, 0x72
je 0x403817
cmp al, 0x52
jne 0x403a48
inc esi
cmp esi, dword [ebp + 8]
jge 0x4039fc
mov ecx, dword [edi + esi*4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403827
sub ecx, edx
lea eax, [ecx + 1]
mov ecx, 0x104
cmp eax, ecx
ja 0x403a6a
push dword [edi + esi*4]
mov edx, ecx
mov ecx, 0x4084e0
call fcn.00402d70
jmp 0x4039fc
inc esi
cmp esi, dword [ebp + 8]
jge 0x4038a3
mov ecx, dword [edi + esi*4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403860
sub ecx, edx
lea eax, [ecx + 1]
mov ecx, 0x104
cmp eax, ecx
ja 0x403a87
push dword [edi + esi*4]
mov edx, ecx
lea ecx, [ebp - 0x108]
call fcn.00402d70
cmp dword [0x4084cc], ebx
je 0x4038a3
push dword [edi + esi*4]
push esi
push 0x401aa8
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
mov byte [ebp - 0x7c9], 1
jmp 0x4039fc
mov dword [0x4084cc], 1
jmp 0x4039fc
cmp byte [0x4084d1], bl
jne 0x403a96
push ecx
push 0x401b58
push ecx
mov edx, 0x104
mov ecx, 0x409ac0
call fcn.00402ebe
jmp 0x4039fc
mov dword [0x4085e4], 1
jmp 0x4039fc
inc esi
cmp esi, dword [ebp + 8]
jge 0x4039fc
mov ecx, dword [edi + esi*4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403904
sub ecx, edx
lea eax, [ecx + 1]
mov ecx, 0x104
cmp eax, ecx
ja 0x403ab3
push ecx
push 0x401b18
push ecx
mov edx, ecx
mov ecx, 0x409ac0
call fcn.00402ebe
push dword [edi + esi*4]
mov edx, 0x104
mov ecx, 0x409ac5
call fcn.00402d70
mov byte [0x4084d1], 1
cmp dword [0x4084cc], ebx
je 0x4039fc
push dword [edi + esi*4]
push esi
push 0x401aa8
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
jmp 0x4039fc
inc esi
cmp esi, dword [ebp + 8]
jge 0x4039fc
mov ecx, dword [edi + esi*4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40397c
sub ecx, edx
lea eax, [ecx + 1]
mov ecx, 0x104
cmp eax, ecx
ja 0x403ac2
push dword [edi + esi*4]
mov edx, ecx
mov ecx, 0x4099a0
call fcn.00402d70
jmp 0x403949
inc esi
cmp esi, dword [ebp + 8]
jge 0x4039fc
mov ecx, dword [edi + esi*4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4039b2
sub ecx, edx
lea eax, [ecx + 1]
mov ecx, 0x104
cmp eax, ecx
ja 0x403a87
push dword [edi + esi*4]
mov edx, ecx
lea ecx, [ebp - 0x108]
call fcn.00402d70
cmp dword [0x4084cc], ebx
je 0x4039f5
push dword [edi + esi*4]
push esi
push 0x401aa8
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
mov byte [0x4084d0], 1
inc esi
cmp esi, dword [ebp + 8]
jl 0x403777
mov edi, 0x104
cmp byte [0x4084d0], bl
je 0x403ad1
cmp byte [ebp - 0x7c9], bl
je 0x403ae0
push 0x401b90
call dword [sym.imp.msvcrt.dll_printf]
push 1
call fcn.00406f3b
push eax
lea eax, [ebp - 0x7c8]
push eax
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 0x10
jmp 0x403aac
push 0x57
pop ebx
push 1
call fcn.00406f3b
push eax
lea eax, [ebp - 0x7c8]
push eax
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 0xc
mov eax, ebx
jmp 0x403b75
push 1
call fcn.00406f3b
push eax
push 0x401b60
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 0xc
push 0x7a
jmp 0x403742
push 1
call fcn.00406f3b
push eax
push 0x401a8c
jmp 0x403a77
push 1
call fcn.00406f3b
push eax
push 0x401b20
call dword [sym.imp.msvcrt.dll_fputs]
add esp, 0xc
push 0x57
jmp 0x403742
push 1
call fcn.00406f3b
push eax
push 0x401ae0
jmp 0x403a77
push 1
call fcn.00406f3b
push eax
push 0x401ab8
jmp 0x403a77
cmp byte [ebp - 0x7c9], bl
jne 0x403ae0
mov byte [0x4084d0], 1
mov ebx, 0x4099a0
lea eax, [ebp - 0x20c]
push ebx
push 0x401be0
push edi
push eax
call fcn.00402df4
add esp, 0x10
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.dbghelp.dll_MakeSureDirectoryPathExists]
test eax, eax
jne 0x403b1f
push ebx
push 0x401be4
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
push 0x57
pop eax
jmp 0x403b75
cmp byte [0x4084d0], 0
jne 0x403b6a
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp byte [0x4084e0], 0
mov dword [0x4084d4], eax
jne 0x403b6a
push edi
mov ebx, 0x4084e0
push ebx
push 0x401c0c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp eax, 1
jl 0x403b5a
cmp eax, 0x103
jle 0x403b6a
push ecx
push 0x401c1c
push ecx
mov edx, edi
mov ecx, ebx
call fcn.00402ebe
lea ecx, [ebp - 0x108]
call fcn.00403139
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406960
leave
ret