Function at 0x402083
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x1ce0]
mov eax, 0x1d60
call fcn.0040bcd0
mov eax, dword [0x4153cc]
xor eax, ebp
mov dword [ebp + 0x1cdc], eax
mov eax, dword [ebp + 0x1ce8]
push ebx
push esi
push edi
xor ebx, ebx
push 0xfff
mov dword [ebp - 0x80], eax
lea eax, [ebp + 0xcd]
mov edi, ecx
push ebx
push eax
mov dword [ebp - 0x78], edi
mov byte [ebp + 0xcc], bl
call sub.msvcr100.dll_memset
push 0x7ff
lea eax, [ebp + 0x10cd]
push ebx
push eax
mov byte [ebp + 0x10cc], bl
call sub.msvcr100.dll_memset
add esp, 0x18
mov esi, 0x800
push esi
lea eax, [ebp + 0x10cc]
push eax
push 0x40e4a0
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
cmp eax, ebx
je 0x40211e
cmp eax, esi
jae 0x40211e
lea eax, [ebp + 0x10cc]
push eax
lea eax, [ebp + 0xcc]
push eax
call dword [sym.imp.kernel32.dll_lstrcpyA]
jmp 0x402133
push 0x1000
lea eax, [ebp + 0xcc]
push eax
push edi
call fcn.00406551
add esp, 0xc
lea eax, [ebp + 0xcc]
push 0x40e4b0
push eax
call dword [sym.imp.msvcr100.dll__mbsstr]
pop ecx
pop ecx
test eax, eax
jne 0x40227e
mov esi, 0x103
push esi
lea eax, [ebp + 0x18cd]
push ebx
push eax
mov byte [ebp + 0x18cc], bl
call sub.msvcr100.dll_memset
push esi
lea eax, [ebp + 0x1ad5]
push ebx
push eax
mov byte [ebp + 0x1ad4], bl
call sub.msvcr100.dll_memset
add esp, 0x18
push 0x104
lea eax, [ebp + 0x18cc]
push eax
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryA]
mov edi, dword [sym.imp.msvcr100.dll_sprintf]
lea eax, [ebp + 0x18cc]
push eax
lea eax, [ebp + 0x1ad4]
push 0x40e4c4
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp + 0x1ad4]
push eax
call dword [sym.imp.kernel32.dll_FindFirstFileA]
push esi
mov dword [ebp - 0x7c], eax
lea eax, [ebp + 0x19d1]
push ebx
push eax
mov byte [ebp + 0x19d0], bl
call sub.msvcr100.dll_memset
push esi
lea eax, [ebp + 0x1bd9]
push ebx
push eax
mov byte [ebp + 0x1bd8], bl
call sub.msvcr100.dll_memset
add esp, 0x18
push 0x104
lea eax, [ebp + 0x19d0]
push eax
push ebx
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
lea eax, [ebp + 0x19d0]
push 0x5c
push eax
call dword [sym.imp.msvcr100.dll_strrchr]
pop ecx
pop ecx
cmp eax, ebx
je 0x402218
mov byte [eax], bl
lea eax, [ebp + 0x19d0]
push eax
lea eax, [ebp + 0x1bd8]
push 0x40e4e8
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp + 0x1bd8]
push eax
call dword [sym.imp.kernel32.dll_FindFirstFileA]
cmp dword [ebp - 0x7c], 0xffffffff
mov ebx, eax
jne 0x402296
cmp ebx, 0xffffffff
je 0x40227e
lea eax, [ebp + 0x1bd8]
push eax
push dword [ebp - 0x78]
mov esi, 0x4154c8
push 0x40e534
push esi
call edi
add esp, 0x10
push ebx
call dword [sym.imp.kernel32.dll_FindClose]
mov ecx, dword [ebp - 0x80]
lea eax, [ebp - 0x78]
push eax
mov dword [ebp - 0x78], esi
call fcn.00402f8c
mov ecx, dword [ebp + 0x1cdc]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040bcaf
add ebp, 0x1ce0
leave
ret
mov esi, 0x4154c8
cmp ebx, 0xffffffff
je 0x4022cc
lea eax, [ebp + 0x1bd8]
push eax
lea eax, [ebp + 0x1ad4]
push eax
push dword [ebp - 0x78]
push 0x40e4f0
push esi
call edi
mov edi, dword [sym.imp.kernel32.dll_FindClose]
add esp, 0x14
push dword [ebp - 0x7c]
call edi
push ebx
call edi
jmp 0x40226f
lea eax, [ebp + 0x1ad4]
push eax
push dword [ebp - 0x78]
push 0x40e514
push esi
call edi
add esp, 0x10
push dword [ebp - 0x7c]
jmp 0x402269