Function at 0x4023c4
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41bce0
mov eax, dword fs:[0]
push eax
mov eax, 0x4240
call fcn.0041b800
mov eax, dword [0x42b004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x41ec], edx
mov dword [ebp - 0x4200], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x41f8], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x41dc], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x41f0], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x41e8], eax
mov eax, dword [ebp + 0x18]
push 0x20a
mov dword [ebp - 0x41fc], eax
call fcn.004047be
mov esi, eax
mov dword [esp], 0x105
push esi
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
mov dword [ebp - 0x41e4], eax
call fcn.00404758
mov esi, dword [ebp - 0x41e4]
pop ecx
test esi, esi
jns 0x402482
xor eax, eax
inc eax
jmp 0x402a11
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x41e0], eax
call fcn.0040b4ac
mov ebx, eax
mov dword [ebp - 0x4014], edi
pop ecx
mov dword [ebp - 0x41e4], ebx
mov dword [ebp - 0x41d8], edi
jmp 0x4024e5
cmp dword [ebp - 0x4014], edi
jbe 0x402504
push dword [ebp - 0x4014]
lea eax, [ebp - 0x4010]
push eax
mov eax, dword [ebp - 0x41d8]
add eax, ebx
push eax
call fcn.00406d40
mov eax, dword [ebp - 0x41d8]
add esp, 0xc
add eax, dword [ebp - 0x4014]
mov dword [ebp - 0x41d8], eax
push edi
lea eax, [ebp - 0x4014]
push eax
push 0x4000
lea eax, [ebp - 0x4010]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4024ad
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x427ef8
lea ecx, [ebp - 0x405c]
call fcn.004039e3
mov esi, eax
push str.___CLRHostPayloadStart
lea ecx, [ebp - 0x402c]
mov dword [ebp - 4], edi
call fcn.004039e3
push esi
push eax
push dword [ebp - 0x41dc]
lea ecx, [ebp - 0x4074]
mov byte [ebp - 4], 1
call fcn.00404583
lea ecx, [ebp - 0x402c]
call fcn.00403dfe
lea ecx, [ebp - 0x405c]
mov byte [ebp - 4], 4
call fcn.00403dfe
push 0x427ef8
lea ecx, [ebp - 0x421c]
call fcn.004039e3
mov esi, eax
push str.___CLRHostPayloadEnd
lea ecx, [ebp - 0x4044]
mov byte [ebp - 4], 5
call fcn.004039e3
push esi
push eax
push dword [ebp - 0x41dc]
lea ecx, [ebp - 0x405c]
mov byte [ebp - 4], 6
call fcn.00404583
lea ecx, [ebp - 0x4044]
call fcn.00403dfe
lea ecx, [ebp - 0x421c]
mov byte [ebp - 4], 9
call fcn.00403dfe
push 0x427ef8
lea ecx, [ebp - 0x4234]
call fcn.004039e3
mov esi, eax
push str.___CLRHostSymbolsEnd
lea ecx, [ebp - 0x402c]
mov byte [ebp - 4], 0xa
call fcn.004039e3
push esi
push eax
push dword [ebp - 0x41dc]
lea ecx, [ebp - 0x4044]
mov byte [ebp - 4], 0xb
call fcn.00404583
lea ecx, [ebp - 0x402c]
call fcn.00403dfe
lea ecx, [ebp - 0x4234]
mov byte [ebp - 4], 0xe
call fcn.00403dfe
push 0x427ef8
lea ecx, [ebp - 0x424c]
call fcn.004039e3
mov esi, eax
mov byte [ebp - 4], 0xf
push str.___CLRHostParamsEnd
lea ecx, [ebp - 0x421c]
call fcn.004039e3
push esi
push eax
push dword [ebp - 0x41dc]
lea ecx, [ebp - 0x402c]
mov byte [ebp - 4], 0x10
call fcn.00404583
lea ecx, [ebp - 0x421c]
call fcn.00403dfe
lea ecx, [ebp - 0x424c]
mov byte [ebp - 4], 0x13
call fcn.00403dfe
cmp dword [ebp - 0x4060], 0x10
lea eax, [ebp - 0x4074]
push dword [ebp - 0x4064]
cmovae eax, dword [ebp - 0x4074]
mov ecx, ebx
mov edx, dword [ebp - 0x41e0]
push eax
call fcn.00402390
cmp dword [ebp - 0x4048], 0x10
lea ecx, [ebp - 0x405c]
push dword [ebp - 0x404c]
cmovae ecx, dword [ebp - 0x405c]
mov edx, dword [ebp - 0x41e0]
push ecx
mov ecx, ebx
mov dword [ebp - 0x41d8], eax
call fcn.00402390
cmp dword [ebp - 0x4030], 0x10
lea ecx, [ebp - 0x4044]
push dword [ebp - 0x4034]
cmovae ecx, dword [ebp - 0x4044]
mov esi, eax
mov edx, dword [ebp - 0x41e0]
push ecx
mov ecx, ebx
mov dword [ebp - 0x4204], esi
call fcn.00402390
cmp dword [ebp - 0x4018], 0x10
lea ecx, [ebp - 0x402c]
push dword [ebp - 0x401c]
cmovae ecx, dword [ebp - 0x402c]
mov edx, dword [ebp - 0x41e0]
push ecx
mov ecx, ebx
mov dword [ebp - 0x41f4], eax
call fcn.00402390
mov edx, dword [ebp - 0x41d8]
add esp, 0x20
mov dword [ebp - 0x41e0], eax
test edx, edx
je 0x4029d9
test esi, esi
je 0x4029d9
test eax, eax
je 0x4029d9
cmp esi, edx
jbe 0x4029d9
mov ecx, dword [ebp - 0x41f4]
cmp eax, ecx
jb 0x4029d9
test ecx, ecx
je 0x4029d9
cmp ecx, esi
jbe 0x4029d9
push 0x20a
call fcn.004047be
pop ecx
mov ebx, eax
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, dword [ebp - 0x41d8]
mov ecx, esi
add eax, dword [ebp - 0x4064]
sub ecx, eax
mov dword [ebp - 0x41d8], eax
mov eax, dword [ebp - 0x41ec]
push ecx
mov dword [eax], ecx
call fcn.004047be
mov ecx, dword [ebp - 0x4200]
mov esi, dword [ebp - 0x41d8]
add esi, dword [ebp - 0x41e4]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x41ec]
push dword [ecx]
push esi
push eax
call fcn.00406d40
push 0x20a
call fcn.004047be
mov ecx, dword [ebp - 0x41f8]
add esp, 0x14
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0x427f58
push ebx
mov dword [ecx], eax
call edi
push 0xb0
lea eax, [ebp - 0x41d4]
push 0
push eax
call fcn.00406be0
pop ecx
pop ecx
lea ecx, [ebp - 0x41d4]
call fcn.0040376b
mov eax, dword [ebp - 0x41f8]
push ecx
push ecx
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x41d4]
push dword [eax]
call fcn.004036b6
mov eax, dword [ebp - 0x41ec]
lea ecx, [ebp - 0x41d4]
push 0
push dword [eax]
push esi
call fcn.00403864
lea ecx, [ebp - 0x41d4]
call fcn.00403643
mov esi, dword [ebp - 0x404c]
mov ecx, dword [ebp - 0x41f0]
add esi, dword [ebp - 0x4204]
mov eax, dword [ebp - 0x41f4]
sub eax, esi
push eax
mov dword [ecx], eax
call fcn.004047be
mov ecx, dword [ebp - 0x41dc]
add esi, dword [ebp - 0x41e4]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x41f0]
push dword [ecx]
push esi
push eax
call fcn.00406d40
push 0x20a
call fcn.004047be
mov ecx, dword [ebp - 0x41e8]
add esp, 0x14
push eax
push 0
push 0x427f58
push ebx
mov dword [ecx], eax
call edi
push 0xb0
xor ebx, ebx
lea eax, [ebp - 0x4124]
push ebx
push eax
call fcn.00406be0
pop ecx
pop ecx
lea ecx, [ebp - 0x4124]
call fcn.0040376b
mov eax, dword [ebp - 0x41e8]
push ecx
push ecx
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x4124]
push dword [eax]
call fcn.004036b6
mov eax, dword [ebp - 0x41f0]
lea ecx, [ebp - 0x4124]
push ebx
push dword [eax]
push esi
call fcn.00403864
lea ecx, [ebp - 0x4124]
call fcn.00403643
mov eax, dword [ebp - 0x4034]
add eax, dword [ebp - 0x41f4]
mov edi, dword [ebp - 0x41e0]
mov esi, dword [ebp - 0x41e4]
sub edi, eax
push ebx
push ebx
push edi
add eax, esi
push eax
push ebx
push 0xfde9
mov dword [ebp - 0x41dc], eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x41e8], eax
test eax, eax
jle 0x402987
xor ecx, ecx
inc eax
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004047be
pop ecx
push dword [ebp - 0x41e8]
mov ecx, dword [ebp - 0x41fc]
push eax
push edi
push dword [ebp - 0x41dc]
mov dword [ecx], eax
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [ebp - 0x41fc]
xor edx, edx
mov eax, dword [ecx]
mov ecx, dword [ebp - 0x41e8]
mov word [eax + ecx*2], dx
push esi
call fcn.0040aae1
pop ecx
lea ecx, [ebp - 0x40bc]
call fcn.00403673
lea eax, [ebp - 0x40bc]
mov byte [ebp - 4], 0x16
mov esi, vtable.std::ios_base.0
push eax
mov dword [ebp - 0x40bc], esi
call fcn.00405c56
pop ecx
lea ecx, [ebp - 0x416c]
call fcn.00403673
lea eax, [ebp - 0x416c]
mov byte [ebp - 4], 0x17
push eax
mov dword [ebp - 0x416c], esi
call fcn.00405c56
pop ecx
jmp 0x4029e3
push ebx
call fcn.0040aae1
pop ecx
push 0xa
pop ebx
lea ecx, [ebp - 0x402c]
call fcn.00403dfe
lea ecx, [ebp - 0x4044]
call fcn.00403dfe
lea ecx, [ebp - 0x405c]
call fcn.00403dfe
lea ecx, [ebp - 0x4074]
call fcn.00403dfe
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404747
leave
ret