Function at 0x40ab90
Capabilities:
Check if file exists
Get common file path
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x42f681
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
mov eax, dword [0x43e234]
push ebp
mov dword [esp + 0x130], eax
push edi
lea eax, [esp + 0x34]
push eax
push 0x100
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0xc]
call fcn.00405da0
push 7
xor edi, edi
push str.wf.dat
lea ecx, [esp + 0x10]
mov dword [esp + 0x148], edi
call fcn.0040aac0
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
mov eax, dword [esp + 8]
jne 0x40ac37
add eax, 0xfffffff0
mov byte [ebp + 0xc], 1
mov dword [esp + 0x140], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aeca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x40aeca
push esi
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, edi
je 0x40aeed
cmp esi, 0xffffffff
je 0x40aeed
push ebx
push edi
push esi
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ecx, [edi + 1]
push ecx
call fcn.00421f3f
add esp, 4
push 0
lea edx, [esp + 0x20]
push edx
push edi
mov ebx, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xa
lea ecx, [esp + 0x24]
mov byte [ebx + edi], 0
call fcn.00421663
mov edi, dword [esp + 0x14]
test edi, edi
mov byte [esp + 0x148], 1
je 0x40ad26
push 0x431de8
push ebx
call fcn.00415e6b
add esp, 8
test eax, eax
je 0x40ad26
jmp 0x40acd0
mov ecx, eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40acd5
sub ecx, esi
mov edi, edi
mov dl, byte [eax + ecx - 1]
cmp dl, 9
je 0x40acee
cmp dl, 0x20
jne 0x40acf5
dec ecx
mov byte [eax + ecx], 0
jmp 0x40ace0
mov dl, byte [eax]
cmp dl, 9
je 0x40ad01
cmp dl, 0x20
jne 0x40ad05
inc eax
dec ecx
jmp 0x40acf5
test ecx, ecx
jle 0x40ad13
push eax
lea ecx, [esp + 0x24]
call fcn.00421778
push 0x431de8
push 0
call fcn.00415e6b
add esp, 8
test eax, eax
jne 0x40acd0
push ebx
call fcn.00421f44
mov eax, dword [esp + 0x30]
add esp, 4
test edi, edi
mov dword [ebp], eax
je 0x40ad96
test eax, eax
jle 0x40ad96
lea eax, [eax*4 + 4]
push eax
call fcn.00421f3f
mov ecx, dword [ebp]
lea edx, [ecx*4 + 4]
push edx
mov dword [ebp + 4], eax
call fcn.00421f3f
mov ecx, dword [ebp]
mov edi, dword [ebp + 4]
shl ecx, 2
mov edx, ecx
shr ecx, 2
mov dword [ebp + 8], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp]
mov edi, dword [ebp + 8]
shl ecx, 2
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x14]
xor esi, esi
test eax, eax
je 0x40ae71
cmp esi, dword [ebp]
jge 0x40ae71
push esi
lea ecx, [esp + 0x24]
call fcn.00421645
test eax, eax
je 0x40ae6c
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.00402a90
add eax, 0x10
add esp, 4
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x148], 2
call fcn.0040aa00
mov ebx, dword [esp + 0x18]
mov edi, dword [ebx - 0xc]
lea eax, [edi + 1]
push eax
call fcn.00421f3f
mov ecx, dword [ebp + 4]
mov dword [ecx + esi*4], eax
mov edx, dword [ebp + 4]
mov eax, dword [edx + esi*4]
lea ecx, [edi*4]
push ecx
mov byte [edi + eax], 0
call fcn.00421f3f
mov edx, dword [ebp + 8]
mov dword [edx + esi*4], eax
mov ecx, dword [ebp + 4]
mov ecx, dword [ecx + esi*4]
add esp, 8
mov eax, ebx
mov dl, byte [eax]
inc eax
mov byte [ecx], dl
inc ecx
test dl, dl
jne 0x40ae24
mov edx, dword [ebp + 8]
mov eax, dword [edx + esi*4]
mov ecx, dword [ebp + 4]
mov edx, dword [ecx + esi*4]
push eax
push edx
call fcn.0040a7f0
lea eax, [ebx - 0x10]
add esp, 8
mov byte [esp + 0x148], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ae66
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
inc esi
jmp 0x40ada4
jmp fcn.004210bb
cmp dword [ebp], 0
je 0x40ae7f
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40ae8a
mov ecx, ebp
mov byte [ebp + 0xc], 1
call fcn.0040a850
lea ecx, [esp + 0x20]
mov byte [ebp + 0xc], 0
mov byte [esp + 0x148], 0
call fcn.0042171d
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x148], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aec8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop ebx
pop esi
mov ecx, dword [esp + 0x138]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x130]
pop ebp
call fcn.00415411
add esp, 0x13c
ret
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov byte [ebp + 0xc], 1
mov dword [esp + 0x144], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aec9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x40aec9