Function at 0x1003b040
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x10046d09
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x1006c318]
xor eax, esp
mov dword [esp + 0xac], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1006c318]
xor eax, esp
push eax
lea eax, [esp + 0xc4]
mov dword fs:[0], eax
mov edi, ecx
mov ecx, dword [esp + 0xd4]
push 0x100598c4
call dword [sym.imp.MFC80U.DLL_Ordinal_870]
push eax
call dword [sym.imp.MSVCR80.dll__wfopen]
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x18], esi
jne 0x1003b0de
push 0x10053524
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x44]
mov dword [esp + 0xd0], esi
call fcn.10007110
push 0x1006126c
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x48], vtable.FileNotFoundError.0
call sub.MSVCR80.dll__CxxThrowException
push esi
push 1
lea edx, [esp + 0xb4]
push 0x12
push edx
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x10
cmp eax, 1
jae 0x1003b142
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
push 0x10053524
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x44]
mov dword [esp + 0xd0], 1
call fcn.10007110
push 0x10064684
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x48], vtable.FileBroken.0
call sub.MSVCR80.dll__CxxThrowException
cmp byte [esp + 0xac], 0
mov ebx, 2
jne 0x1003b360
cmp byte [esp + 0xad], 0
jne 0x1003b360
cmp byte [esp + 0xae], bl
jne 0x1003b360
test byte [esp + 0xbd], 0xf0
jne 0x1003b360
cmp byte [esp + 0xbc], 0x20
jne 0x1003b360
movsx edx, word [esp + 0xba]
movsx eax, word [esp + 0xb8]
push 0x18
push edx
lea ecx, [edi + 4]
push eax
mov dword [esp + 0x2c], ecx
call fcn.10039980
movsx edx, word [esp + 0xba]
movsx eax, word [esp + 0xb8]
push 8
push edx
lea ecx, [edi + 0x10]
push eax
mov dword [esp + 0x28], ecx
call fcn.10039980
movsx ecx, word [esp + 0xb8]
add ecx, ecx
add ecx, ecx
push ecx
call dword [sym.imp.MSVCR80.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x14], ebp
jne 0x1003b223
push 0x10053524
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x44]
mov dword [esp + 0xd0], 3
call fcn.10012720
push 0x1005f0e4
lea eax, [esp + 0x44]
push eax
call sub.MSVCR80.dll__CxxThrowException
xor ebx, ebx
cmp word [esp + 0xba], bx
jle 0x1003b2d7
mov di, word [esp + 0xb8]
jmp 0x1003b240
movsx ecx, di
push esi
add ecx, ecx
push 1
add ecx, ecx
push ecx
push ebp
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x10
cmp eax, 1
jb 0x1003b312
mov ecx, dword [esp + 0x20]
push ebx
call fcn.10039600
mov ecx, dword [esp + 0x1c]
push ebx
mov esi, eax
call fcn.10039600
mov di, word [esp + 0xb8]
xor edx, edx
test di, di
mov ebp, eax
jle 0x1003b2bc
mov ecx, dword [esp + 0x14]
lea esp, [esp]
mov ax, word [ecx]
mov word [esi], ax
movzx eax, byte [ecx + 2]
mov byte [esi + 2], al
movzx eax, byte [ecx + 3]
mov byte [edx + ebp], al
mov di, word [esp + 0xb8]
movsx eax, di
add edx, 1
add esi, 3
add ecx, 4
cmp edx, eax
jl 0x1003b290
movsx ecx, word [esp + 0xba]
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
add ebx, 1
cmp ebx, ecx
jl 0x1003b240
push ebp
call dword [sym.imp.MSVCR80.dll_free]
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 8
mov ecx, dword [esp + 0xc4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xac]
xor ecx, esp
call fcn.1003e9c6
add esp, 0xbc
ret 4
push ebp
call dword [sym.imp.MSVCR80.dll_free]
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 8
push 0x10053524
lea ecx, [esp + 0x6c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea edx, [esp + 0x68]
push edx
lea ecx, [esp + 0x88]
mov dword [esp + 0xd0], 4
call fcn.10039590
push 0x10064684
lea eax, [esp + 0x88]
push eax
call sub.MSVCR80.dll__CxxThrowException
push 0x10053524
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x44]
mov dword [esp + 0xd0], ebx
call fcn.10007110
push 0x100615d4
lea edx, [esp + 0x44]
push edx
mov dword [esp + 0x48], vtable.UnknownFormat.0
call sub.MSVCR80.dll__CxxThrowException
int3