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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006c534
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x1008acc0]
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.10054290
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.10054ab0
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.100070c0
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.10007010
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.100070c0
add esp, 0xc
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x3c]
call fcn.10001fa0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x38]
call fcn.10001fa0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x34]
call fcn.10001fa0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x30]
call fcn.10001fa0
lea ecx, [ebp - 0x1c]
call fcn.1001ad60
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10058cdd
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.10001fa0
jmp 0x10058e75
lea ecx, [ebp - 0x1c]
call fcn.1001ad60
push eax
call fcn.10051ea0
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.1002799a
add esp, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x10058e66
mov ecx, dword [ebp - 0x10]
lea edx, [ecx + ecx + 2]
push edx
push 0
mov eax, dword [ebp - 0x18]
push eax
call fcn.10038c10
add esp, 0xc
mov dword [ebp - 0x20], 0
push 0x10075f60
lea ecx, [ebp - 0x1c]
call fcn.1001ad60
push eax
lea ecx, [ebp - 0x20]
push ecx
call fcn.1003bdb1
add esp, 0xc
test eax, eax
jne 0x10058e54
cmp dword [ebp - 0x20], 0
je 0x10058e54
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.1003cd19
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 0x10058e48
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx]
test edx, edx
je 0x10058e48
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 0x10075f68
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.10001850
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x10058df7
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.10001d60
mov byte [ebp - 4], 9
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x48]
call fcn.10001d60
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.100582b0
add esp, 0xc
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x48]
call fcn.10001fa0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x44]
call fcn.10001fa0
jmp 0x10058d9b
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.1003c354
add esp, 4
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
push eax
call fcn.100279a5
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.10001fa0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret