Function at 0x407890
Capabilities:
Get file size
Query environment variable
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41d27c
mov eax, dword fs:[0]
push eax
mov eax, 0x80e8
mov dword fs:[0], esp
call fcn.00411880
mov eax, dword [0x42aa60]
push ebx
push ebp
push esi
push edi
push 1
xor ebx, ebx
lea edi, [ecx + 0x1c]
push ebx
mov dword [esp + 0x1c], ecx
push 0x41ed28
mov ecx, edi
mov dword [esp + 0x8100], eax
call fcn.00406770
cmp eax, 0xffffffff
mov ebp, 0x10
jne 0x407aab
push 0x7fff
lea eax, [esp + 0xf8]
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, 0xf
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
push 0x3c
push str.c:windows_system32_c:winnt_system32_c:WindowsSysWOW64_._
lea ecx, [esp + 0x44]
mov dword [esp + 0x8108], ebx
mov dword [esp + 0x5c], esi
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
call fcn.00402630
lea ecx, [esp + 0xf4]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x810c], 1
call fcn.004077e0
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x64]
mov byte [esp + 0x810c], 2
call fcn.00402540
cmp dword [esp + 0x38], ebp
jb 0x40797b
mov ecx, dword [esp + 0x24]
push ecx
call fcn.004105ec
add esp, 4
cmp dword [esp + 0x54], ebp
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
mov byte [esp + 0x8100], bl
jb 0x4079a1
mov edx, dword [esp + 0x40]
push edx
call fcn.004105ec
add esp, 4
cmp dword [esp + 0x70], ebp
mov eax, dword [esp + 0x5c]
jae 0x4079af
lea eax, [esp + 0x5c]
push 0x41ecdc
push eax
call fcn.004116dd
add esp, 8
lea ecx, [ecx]
mov ecx, eax
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x4079d1
sub ecx, esi
push ecx
push eax
lea ecx, [esp + 0x44]
call fcn.00402630
push 1
push 0x41ecd8
lea ecx, [esp + 0x44]
mov byte [esp + 0x8108], 3
call fcn.00406d60
push 0xffffffffffffffff
push ebx
push edi
lea ecx, [esp + 0x48]
call fcn.00406c70
cmp dword [esp + 0x54], ebp
mov eax, dword [esp + 0x40]
jae 0x407a18
lea eax, [esp + 0x40]
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, ebx
je 0x407a3a
cmp esi, 0xffffffff
jne 0x407a80
cmp dword [esp + 0x54], ebp
mov byte [esp + 0x8100], bl
jb 0x407a54
mov eax, dword [esp + 0x40]
push eax
call fcn.004105ec
add esp, 4
push 0x41ecdc
push ebx
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
call fcn.004116dd
add esp, 8
cmp eax, ebx
je 0x407a93
mov esi, 0xf
jmp 0x4079c0
cmp dword [esp + 0x54], ebp
jb 0x407a93
mov ecx, dword [esp + 0x40]
push ecx
call fcn.004105ec
add esp, 4
cmp dword [esp + 0x70], ebp
jb 0x407aa6
mov edx, dword [esp + 0x5c]
push edx
call fcn.004105ec
add esp, 4
cmp esi, 0xffffffff
jne 0x407ad1
cmp dword [edi + 0x18], ebp
jb 0x407ab5
mov eax, dword [edi + 4]
jmp 0x407ab8
lea eax, [edi + 4]
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, ebx
je 0x407bfd
cmp esi, 0xffffffff
je 0x407bfd
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x407b27
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x78]
push str.GetFileSizeEx__X
push ecx
call fcn.004115cf
add esp, 0xc
push ebx
push str.Error
lea edx, [esp + 0x7c]
push edx
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0xb
jmp 0x407c02
mov edi, dword [esp + 0x18]
lea eax, [edi + 0x64]
push eax
call fcn.00410d6b
mov ecx, dword [esp + 0x18]
add esp, 4
cmp eax, ebx
mov dword [ecx + 0x48], eax
jne 0x407b71
push edi
lea edx, [esp + 0x78]
push str.Out_of_Memory__u
push edx
call fcn.004115cf
add esp, 0xc
push ebx
push str.Error
lea eax, [esp + 0x7c]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 3
jmp 0x407c02
push ebx
lea ecx, [esp + 0x14]
push ecx
push edi
push eax
push esi
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebp, ebx
jne 0x407bc4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea edx, [esp + 0x7c]
push str._u___x
push edx
call fcn.004115cf
add esp, 0x10
push ebx
push str.Error
lea eax, [esp + 0x7c]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 4
jmp 0x407c02
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x407bf9
push edi
push eax
lea ecx, [esp + 0x7c]
push str._u__u
push ecx
call fcn.004115cf
add esp, 0x10
push ebx
push str.Error
lea edx, [esp + 0x7c]
push edx
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 2
jmp 0x407c02
xor eax, eax
jmp 0x407c02
mov eax, 1
mov ecx, dword [esp + 0x80f8]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x80e8]
pop ebx
call fcn.00410c16
add esp, 0x80f4
ret