Function at 0x408390
Capabilities:
Get file size
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416c81
mov eax, dword fs:[0]
push eax
sub esp, 0x838
mov eax, dword [0x41e028]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
mov dword [ebp - 0x82c], edi
mov dword [ebp - 0x830], edi
mov dword [ebp - 0x834], edi
mov edx, dword [ebp + 8]
push 0x2710
push edi
lea eax, [ebp - 0x824]
push eax
lea ecx, [ebp - 0x834]
push ecx
mov dword [ebp - 4], edi
push edx
mov dword [ebp - 0x824], edi
call fcn.00406640
test eax, eax
jne 0x408711
cmp dword [ebp - 0x824], 0xc
jb 0x408711
xor esi, esi
mov dword [ebp - 0x818], edi
mov dword [ebp - 0x81c], edi
mov dword [ebp - 0x820], esi
mov dword [ebp - 0x838], edi
mov byte [ebp - 4], 2
push 0xc800
mov dword [ebp - 0x83c], edi
mov dword [ebp - 0x840], edi
call fcn.00409507
add esp, 4
mov dword [ebp - 0x828], eax
mov dword [ebp - 0x840], eax
cmp eax, edi
je 0x4086ef
push 0xc800
push edi
push eax
mov dword [ebp - 0x83c], 0xc800
call fcn.0040e850
mov ebx, dword [ebp - 0x834]
mov eax, dword [ebx + 8]
lea ecx, [eax + 0xc]
add esp, 0xc
cmp ecx, dword [ebp - 0x824]
jne 0x4086a5
cmp eax, edi
je 0x4086a5
mov edx, eax
mov byte [edx + ebx + 0xb], 0
mov eax, dword [ebx + 8]
lea esi, [ebx + 0xc]
push 0x7fe
lea edx, [ebp - 0x812]
xor ecx, ecx
push edi
mov byte [eax + esi - 2], 0
push edx
mov word [ebp - 0x814], cx
call fcn.0040e850
add esp, 0xc
push 0x400
lea eax, [ebp - 0x814]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x4084ed
push esi
lea ecx, [ebp - 0x814]
push 0x400
push ecx
call fcn.0040a937
add esp, 0xc
push edi
push edi
push 3
push edi
push 3
push 0x80000000
lea edx, [ebp - 0x814]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x408529
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push esi
mov dword [ebp - 0x824], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
jne 0x408568
mov ebx, 0x14
mov edi, ebx
lea esi, [ebp - 0x820]
call fcn.00401760
mov esi, dword [ebp - 0x820]
test eax, eax
je 0x4086d7
mov dword [esi], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 4], eax
xor eax, eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jmp 0x4086d9
mov ecx, dword [ebx]
cmp edi, ecx
ja 0x4085a9
mov ebx, 0x14
mov edi, ebx
lea esi, [ebp - 0x820]
call fcn.00401760
mov esi, dword [ebp - 0x820]
test eax, eax
je 0x4086d7
mov ecx, dword [ebp - 0x824]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jmp 0x4086d9
mov eax, edi
sub eax, ecx
cmp eax, 0xc800
jbe 0x4085b9
mov eax, 0xc800
mov ebx, dword [ebx + 4]
test ebx, ebx
je 0x4085c6
cmp eax, ebx
jbe 0x4085c6
mov eax, ebx
mov edx, dword [ebp - 0x828]
push eax
push edx
lea eax, [ebp - 0x814]
push eax
call fcn.00401b10
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
jne 0x408623
mov ebx, 0x14
mov edi, ebx
lea esi, [ebp - 0x820]
call fcn.00401760
mov esi, dword [ebp - 0x820]
test eax, eax
je 0x4086d7
mov dword [esi], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 4], eax
xor eax, eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jmp 0x4086d9
xor esi, esi
lea ebx, [edi + 0x14]
mov dword [ebp - 0x81c], esi
mov dword [ebp - 0x820], esi
cmp ebx, esi
jle 0x4086d7
push ebx
call fcn.00409507
mov esi, eax
add esp, 4
mov dword [ebp - 0x820], esi
test esi, esi
je 0x4086d7
push ebx
push 0
push esi
mov dword [ebp - 0x81c], ebx
call fcn.0040e850
mov ecx, dword [ebp - 0x824]
mov edx, dword [ebp - 0x834]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], ecx
mov eax, dword [edx]
add esp, 0xc
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], edi
test edi, edi
je 0x4086d9
mov ecx, dword [ebp - 0x828]
push edi
push ecx
lea edx, [esi + 0x14]
push edx
call fcn.0040e8d0
add esp, 0xc
jmp 0x4086d9
mov ebx, 0x14
mov edi, ebx
lea esi, [ebp - 0x820]
call fcn.00401760
mov esi, dword [ebp - 0x820]
test eax, eax
je 0x4086d7
xor eax, eax
mov dword [esi], 2
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jmp 0x4086d9
xor ebx, ebx
mov eax, dword [ebp + 8]
push 0
push esi
push eax
mov eax, ebx
call fcn.00406860
mov eax, dword [ebp - 0x828]
xor edi, edi
mov byte [ebp - 4], 1
cmp eax, edi
je 0x408700
push eax
call fcn.00409587
add esp, 4
mov byte [ebp - 4], 0
cmp esi, edi
je 0x408711
push esi
call fcn.00409587
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x834]
cmp eax, edi
je 0x40872b
push eax
call fcn.00409587
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040942c
mov esp, ebp
pop ebp
ret