Function at 0x10012e10
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x205c
call fcn.10001480
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 0x78], 0x1fe0
lea eax, [esp + 0x7c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x74], eax
lea ecx, [esp + 0x24]
push esi
mov eax, dword [ebp + 0x12c4]
push edi
mov dword [esp + 0x78], 0x100541c4
mov dword [esp + 0x2c], 0x10059da0
lea eax, [eax*2 + 0x16]
mov dword [esp + 0x30], 0
push eax
mov dword [esp + 0x38], 0
mov word [esp + 0x3c], 0x1ff
call fcn.10004970
mov edi, dword [esp + 0x2c]
test eax, eax
je 0x10012ec8
mov eax, dword [ebp + 0x12c4]
xor edx, edx
mov ecx, dword [ebp + 0x12c0]
add eax, eax
push eax
push ecx
lea esi, [edi + eax]
mov word [esi], dx
push edi
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor eax, eax
mov word [esi + 0x14], ax
mov eax, dword [str.idmfc.dat]
mov dword [esi], eax
mov eax, dword [0x10054074]
mov dword [esi + 4], eax
mov eax, dword [0x10054078]
mov dword [esi + 8], eax
mov eax, dword [0x1005407c]
mov dword [esi + 0xc], eax
mov eax, dword [0x10054080]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x1300]
lea esi, [ebp + 0x1220]
or eax, dword [ebp + 0x1304]
mov dword [esp + 0x18], esi
je 0x10012ee4
mov bl, 1
jmp 0x10012ee6
xor bl, bl
push 0x100500bc
push edi
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.msvcrt.dll__wfopen]
mov edi, eax
add esp, 8
mov dword [esp + 0x3c], edi
test edi, edi
je 0x10013292
lea eax, [esp + 0x40]
push eax
push edi
call dword [sym.imp.msvcrt.dll__fileno]
add esp, 4
push eax
call dword [sym.imp.msvcrt.dll__fstat64]
add esp, 8
test eax, eax
js 0x10013292
mov eax, dword [ebp + 0x1300]
cmp eax, dword [esp + 0x68]
jne 0x10012f48
mov eax, dword [ebp + 0x1304]
cmp eax, dword [esp + 0x6c]
je 0x100132ca
cmp dword [esp + 0x5c], 0
jg 0x10013296
mov eax, dword [esp + 0x58]
jl 0x10012f64
cmp eax, 0x2800
ja 0x10013296
lea esi, [eax + 1]
mov eax, dword [esp + 0x80]
cmp esi, eax
jbe 0x10012f9d
mov eax, dword [esp + 0x78]
lea ecx, [esp + 0x78]
push 0
call dword [eax + 4]
push esi
call dword [sym.imp.msvcrt.dll_malloc]
mov ecx, eax
add esp, 4
xor eax, eax
mov dword [esp + 0x7c], ecx
test ecx, ecx
cmovne eax, esi
mov dword [esp + 0x80], eax
mov ecx, dword [esp + 0x7c]
test ecx, ecx
je 0x10013081
push edi
dec eax
push eax
push 1
push ecx
call dword [sym.imp.msvcrt.dll_fread]
mov esi, eax
add esp, 0x10
mov dword [esp + 0x28], esi
cmp esi, 0xa
jl 0x10013081
mov ecx, dword [esp + 0x7c]
mov byte [esp + 0x17], 0
mov byte [ecx + esi], 0
mov ecx, 1
mov word [ebp + 0x1308], cx
mov ebp, dword [sym.imp.msvcrt.dll_strncmp]
mov edi, dword [esp + 0x7c]
mov ebx, esi
push 3
push 0x10053080
push edi
call ebp
add esp, 0xc
test eax, eax
jne 0x10013000
lea ebx, [esi - 3]
test eax, eax
lea esi, [edi + 3]
cmovne esi, edi
xor ecx, ecx
test ebx, ebx
jle 0x10013031
mov edi, edi
movzx eax, byte [esi + ecx]
mov al, byte [eax*2 + 0x10050110]
shr al, 1
test al, 1
je 0x10013026
inc ecx
cmp ecx, ebx
jl 0x10013010
cmp ecx, 3
jl 0x10013031
cmp byte [esi + ecx], 0x3d
je 0x1001306a
cmp byte [esp + 0x17], 0
jne 0x10013081
mov ecx, dword [esp + 0x24]
add ecx, 0x88
call fcn.10003330
mov edx, dword [esp + 0x7c]
mov esi, dword [esp + 0x28]
push edx
push esi
mov byte [ecx + 0x10a4], 0
call fcn.100032c0
add esp, 8
mov byte [esp + 0x17], 1
jmp 0x10012fe6
mov eax, esi
lea ecx, [esi + ebx]
cmp eax, ecx
jae 0x10013081
cmp byte [eax], 0xa
lea edi, [eax + 1]
je 0x1001308a
mov eax, edi
cmp eax, ecx
jb 0x10013073
mov esi, dword [esp + 0x18]
jmp 0x10013296
mov ebp, dword [sym.imp.msvcrt.dll_sscanf]
mov eax, esi
sub eax, edi
add ebx, eax
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x1c]
push eax
lea eax, [ecx + 0x1308]
push eax
push str._FORMAT_hu_n
push esi
call ebp
add esp, 0x10
cmp eax, 1
je 0x100130e2
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x24]
push eax
push str._LINES_u_n
push esi
call ebp
add esp, 0x10
cmp eax, 1
je 0x100130e2
cmp esi, edi
jae 0x100130de
cmp byte [esi], 0x3b
je 0x100130e6
inc esi
cmp esi, edi
jb 0x100130d4
xor esi, esi
jmp 0x100130e6
add esi, dword [esp + 0x1c]
test esi, esi
je 0x1001310e
cmp byte [esi], 0x3b
jne 0x100130f2
inc esi
jmp 0x10013096
movzx eax, byte [esi]
inc esi
movzx eax, byte [eax*2 + 0x10050110]
and al, 1
jne 0x100130f2
test esi, esi
je 0x1001310e
cmp esi, edi
jb 0x10013081
cmp dword [esp + 0x20], 0
jl 0x10013081
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
mov dword [edx + 4], 0
mov byte [eax], 0
mov eax, dword [esp + 0x28]
inc eax
cmp dword [edx + 8], eax
jae 0x1001313f
push eax
mov ecx, edx
call fcn.10003580
mov edx, dword [esp + 0x18]
xor cl, cl
xor ebp, ebp
mov byte [esp + 0x17], cl
test ebx, ebx
js 0x10013081
nop
test cl, cl
je 0x1001317d
cmp ebx, 1
jbe 0x10013280
cmp byte [edi], 0x2a
jne 0x10013280
cmp byte [edi + 1], 0x2f
jne 0x10013280
xor cl, cl
inc edi
mov byte [esp + 0x17], cl
dec ebx
jmp 0x10013280
test ebp, ebp
jne 0x100131a1
test ebx, ebx
je 0x10013280
movzx eax, byte [edi]
test byte [eax*2 + 0x10050110], 1
jne 0x10013280
mov ebp, edi
jmp 0x10013280
test ebx, ebx
je 0x100131b3
mov al, byte [edi]
cmp al, 0xd
je 0x100131b3
cmp al, 0xa
jne 0x10013280
movzx eax, byte [edi - 1]
lea ecx, [edi - 1]
mov dword [esp + 0x1c], 0
mov esi, edi
test byte [eax*2 + 0x10050110], 1
je 0x100131e3
mov edi, edi
mov esi, ecx
movzx eax, byte [esi - 1]
lea ecx, [esi - 1]
test byte [eax*2 + 0x10050110], 1
jne 0x100131d0
cmp byte [ebp], 0x2f
jne 0x10013203
mov al, byte [ebp + 1]
cmp al, 0x2a
jne 0x100131fb
mov cl, 1
mov byte [esp + 0x17], cl
jmp 0x1001327c
cmp al, 0x2f
je 0x10013278
mov eax, dword [edx + 4]
test eax, eax
je 0x10013238
add eax, 2
cmp dword [edx + 8], eax
jae 0x10013222
push eax
mov ecx, edx
call fcn.10003580
mov edx, dword [esp + 0x18]
test eax, eax
je 0x10013238
mov eax, dword [edx + 4]
mov ecx, dword [edx]
mov byte [ecx + eax], 0x7c
mov ecx, dword [edx + 4]
mov eax, dword [edx]
inc ecx
mov dword [edx + 4], ecx
mov byte [ecx + eax], 0
sub esi, ebp
test esi, esi
jle 0x10013274
mov eax, dword [edx + 4]
inc eax
add eax, esi
cmp dword [edx + 8], eax
jae 0x10013259
push eax
mov ecx, edx
call fcn.10003580
test eax, eax
je 0x10013274
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 4]
mov ecx, dword [edx]
add ecx, eax
add eax, esi
push esi
push ebp
mov dword [edx + 4], eax
push ecx
mov byte [ecx + esi], 0
call sub.msvcrt.dll_memcpy
add esp, 0xc
dec dword [esp + 0x20]
mov cl, byte [esp + 0x17]
mov ebp, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
inc edi
sub ebx, 1
jns 0x10013150
mov esi, edx
jmp 0x10013296
test bl, bl
je 0x100132c6
cmp dword [esp + 0x20], 0
je 0x100132aa
mov ecx, esi
call fcn.10003f30
xor eax, eax
xor ecx, ecx
jmp 0x100132b2
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x3c]
mov dword [edx + 0x1300], eax
mov dword [edx + 0x1304], ecx
test edi, edi
je 0x100132d4
push edi
call dword [sym.imp.msvcrt.dll_fclose]
add esp, 4
mov eax, dword [esp + 0x2c]
mov esi, dword [sym.imp.msvcrt.dll_free]
cmp eax, 0x10059da0
je 0x100132ee
add eax, 0xfffffffc
push eax
call esi
add esp, 4
mov ecx, dword [esp + 0x7c]
lea edx, [esp + 0x84]
xor eax, eax
mov dword [esp + 0x78], 0x10053070
cmp ecx, edx
cmove ecx, eax
mov dword [esp + 0x7c], ecx
test ecx, ecx
je 0x10013316
push ecx
call esi
add esp, 4
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x205c
ret