Function at 0x1004b410
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005660e
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x1006dd60]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.10046b30
add esp, 8
mov dword [ebp - 0x50], eax
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x54], edx
mov dword [ebp - 4], 0
lea eax, [ebp - 0x34]
push eax
call fcn.10047300
add esp, 4
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x5c], ecx
mov byte [ebp - 4], 1
push str.strconv_
mov edx, dword [ebp - 0x5c]
push edx
lea eax, [ebp - 0x38]
push eax
call fcn.100051c0
add esp, 0xc
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x60]
mov dword [ebp - 0x64], ecx
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x54]
push edx
mov eax, dword [ebp - 0x64]
push eax
lea ecx, [ebp - 0x3c]
push ecx
call fcn.10005110
add esp, 0xc
mov dword [ebp - 0x68], eax
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x6c], edx
mov byte [ebp - 4], 3
push str..txt
mov eax, dword [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x1c]
push ecx
call fcn.100051c0
add esp, 0xc
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x3c]
call fcn.1000fd80
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x38]
call fcn.1000fd80
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x34]
call fcn.1000fd80
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x30]
call fcn.1000fd80
lea ecx, [ebp - 0x1c]
call fcn.1000d230
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1004b51d
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.1000fd80
jmp 0x1004b6b5
lea ecx, [ebp - 0x1c]
call fcn.1000d230
push eax
call fcn.10044f60
add esp, 4
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
shr edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100198f0
add esp, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x1004b6a6
mov ecx, dword [ebp - 0x10]
lea edx, [ecx + ecx + 2]
push edx
push 0
mov eax, dword [ebp - 0x18]
push eax
call fcn.1002c440
add esp, 0xc
mov dword [ebp - 0x20], 0
push 0x1005fc5c
lea ecx, [ebp - 0x1c]
call fcn.1000d230
push eax
lea ecx, [ebp - 0x20]
push ecx
call fcn.1002c77c
add esp, 0xc
test eax, eax
jne 0x1004b694
cmp dword [ebp - 0x20], 0
je 0x1004b694
mov edx, dword [ebp - 0x20]
push edx
push 1
mov eax, dword [ebp - 0x10]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.1002e17e
add esp, 0x10
mov edx, dword [ebp - 0x18]
add edx, 2
mov dword [ebp - 0x28], edx
xor eax, eax
mov word [ebp - 0x22], ax
cmp dword [ebp - 0x28], 0
je 0x1004b688
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx]
test edx, edx
je 0x1004b688
mov eax, dword [ebp - 0x28]
mov cx, word [eax]
mov word [ebp - 0x24], cx
mov edx, dword [ebp - 0x28]
add edx, 4
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
push 0x1005fc64
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.1000c600
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x1004b637
xor edx, edx
mov eax, dword [ebp - 0x28]
mov word [eax], dx
mov ecx, dword [ebp - 0x28]
add ecx, 4
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x44]
call fcn.1000fd00
mov byte [ebp - 4], 9
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x48]
call fcn.1000fd00
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x44]
push ecx
lea edx, [ebp - 0x48]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.1004a850
add esp, 0xc
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x48]
call fcn.1000fd80
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x44]
call fcn.1000fd80
jmp 0x1004b5db
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.1002ca2a
add esp, 4
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
push eax
call fcn.100198fb
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.1000fd80
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret