Function at 0x100140e0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100170c2
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x10021568]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [esi + 0x28]
mov dword [ebp - 0x20], ecx
call dword [sym.imp.mfc100.dll_Ordinal_3839]
mov eax, dword [esi + 4]
mov ecx, 0x1001b91c
test al, 0x40
je 0x10014129
mov ecx, 0x1001b918
jmp 0x10014132
test al, 0x20
je 0x10014132
mov ecx, 0x1001b914
mov eax, dword [ebp + 8]
push ecx
push eax
mov dword [esi], 0
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [esi], eax
test eax, eax
jne 0x10014167
mov ecx, esi
call fcn.1000fe60
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi + 4]
xor edi, edi
mov byte [ebp - 0xd], 1
mov dword [esi + 0x20], 1
test cl, 0x10
je 0x10014322
mov ebx, dword [sym.imp.MSVCR100.dll__fseeki64]
push 2
push edi
push edi
push eax
call ebx
mov ecx, dword [esi]
push ecx
call dword [sym.imp.MSVCR100.dll__ftelli64]
push edi
push edi
mov dword [esi + 0x14], edx
mov edx, dword [esi]
push edi
push edx
mov dword [esi + 0x10], eax
call ebx
add esp, 0x24
mov ebx, 0x400
cmp dword [esi + 0x14], edi
jg 0x100141c3
jl 0x100141b8
cmp dword [esi + 0x10], ebx
jae 0x100141c3
mov ebx, dword [esi + 0x10]
test ebx, ebx
je 0x100143ce
push ebx
call sub.mfc100.dll_Ordinal_265
mov ecx, dword [esi]
push ecx
push 1
push ebx
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x14
cmp eax, 1
sete al
mov byte [ebp - 0xd], al
test al, al
je 0x10014311
and dword [esi + 4], 0xfffffffa
mov dword [ebp - 0x14], edi
cmp dword [0x10021270], edi
je 0x1001426b
xor eax, eax
mov edi, edi
mov ecx, dword [eax + 0x10021274]
test ecx, ecx
jle 0x1001422a
cmp edi, ebx
jge 0x1001422a
mov ecx, dword [ebp - 0x18]
mov cl, byte [ecx + edi]
mov edx, dword [eax + 0x10021270]
cmp cl, byte [edi + edx]
mov ecx, dword [eax + 0x10021274]
jne 0x1001422a
inc edi
cmp edi, ecx
jl 0x1001420a
mov eax, dword [ebp - 0x14]
cmp edi, ecx
je 0x10014244
inc eax
mov dword [ebp - 0x14], eax
xor edi, edi
shl eax, 4
cmp dword [eax + 0x10021270], edi
jne 0x10014200
jmp 0x1001426b
shl eax, 4
mov edx, dword [eax + 0x1002127c]
or edx, dword [esi + 4]
mov dword [esi + 4], edx
cmp edi, 2
jne 0x1001425b
mov dword [esi + 0x20], edi
mov eax, dword [eax + 0x10021278]
push eax
lea ecx, [esi + 0x2c]
call dword [sym.imp.mfc100.dll_Ordinal_1316]
cmp ebx, edi
jle 0x10014282
mov ecx, dword [esi]
mov eax, edi
cdq
push 0
push edx
push eax
push ecx
call dword [sym.imp.MSVCR100.dll__fseeki64]
add esp, 0x10
test edi, edi
jne 0x100142f2
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc100.dll_Ordinal_316]
mov edx, dword [ebp - 0x18]
push ebx
push edx
push ebx
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], edi
call dword [sym.imp.mfc100.dll_Ordinal_4498]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push ebx
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc100.dll_Ordinal_11439]
push ecx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], esp
mov eax, esp
lea edx, [ebp - 0x1c]
push edx
mov dword [eax], ecx
call fcn.10011710
add esp, 8
push eax
lea ecx, [esi + 0x2c]
mov byte [ebp - 4], 1
call dword [sym.imp.mfc100.dll_Ordinal_1313]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc100.dll_Ordinal_901]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc100.dll_Ordinal_901]
mov eax, dword [esi + 0x2c]
cmp dword [eax - 0xc], 0
lea ecx, [esi + 0x2c]
jne 0x10014311
mov edx, dword [ebp - 0x18]
cmp byte [edx], 0x3c
jne 0x10014311
push str.UTF_8
call dword [sym.imp.mfc100.dll_Ordinal_1316]
mov eax, dword [ebp - 0x18]
push eax
call sub.mfc100.dll_Ordinal_266
add esp, 4
jmp 0x100143c4
test cl, 0x20
je 0x100143ce
test cl, 0x40
je 0x1001434f
push 2
push 0
push 0
push eax
call dword [sym.imp.MSVCR100.dll__fseeki64]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.MSVCR100.dll__ftelli64]
add esp, 0x14
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
xor ecx, ecx
cmp dword [0x10021270], ecx
je 0x100143ce
mov edx, dword [esi + 4]
xor eax, eax
mov edi, edi
test dword [eax + 0x1002127c], edx
jne 0x10014378
inc ecx
mov eax, ecx
shl eax, 4
cmp dword [eax + 0x10021270], edi
jne 0x10014360
jmp 0x100143ce
shl ecx, 4
mov ebx, ecx
mov edi, dword [ebx + 0x10021274]
cmp edi, 2
jne 0x1001438b
mov dword [esi + 0x20], edi
mov edx, dword [ebx + 0x10021278]
push edx
lea ecx, [esi + 0x2c]
call dword [sym.imp.mfc100.dll_Ordinal_1316]
mov eax, dword [esi + 0x10]
or eax, dword [esi + 0x14]
je 0x100143a7
xor edi, edi
jmp 0x100143ce
mov ecx, dword [esi]
mov edx, dword [ebx + 0x10021270]
push ecx
push 1
push edi
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, 1
sete byte [ebp - 0xd]
cmp byte [ebp - 0xd], 0
je 0x1001414c
test byte [esi + 4], 0x40
je 0x100143df
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov dword [esi + 0x1c], ecx
jmp 0x100143e5
mov eax, edi
cdq
mov dword [esi + 0x1c], edx
mov dword [esi + 0x18], eax
test edi, edi
je 0x10014416
mov edx, dword [ebp - 0x20]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov eax, esp
mov dword [ebp - 0x18], esp
push ecx
mov dword [eax], 0
mov eax, esp
mov dword [ebp - 0x18], esp
push edx
mov dword [eax], 0x1001b910
call fcn.10013ee0
add esp, 0x18
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4