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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41b5bd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x90
mov eax, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov edx, dword [eax]
push ebx
push esi
push edi
mov esi, ecx
push edx
lea ecx, [esi + 0x20]
push 0
mov dword [ebp - 0x1c], ecx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::erase_unsigned_int__unsigned_int_]
mov eax, dword [esi + 4]
test al, 0x40
mov ecx, 0x421cf8
je 0x414e4c
mov ecx, 0x421cf0
jmp 0x414e55
test al, 0x20
je 0x414e55
mov ecx, 0x421ce8
mov eax, dword [ebp + 8]
push ecx
push eax
push esi
mov dword [esi], 0
call dword [sym.imp.MSVCR80.dll__wfopen_s]
add esp, 0xc
test eax, eax
je 0x414e8e
mov ecx, esi
mov dword [esi], 0
call fcn.00410420
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi]
test ecx, ecx
jne 0x414eae
mov ecx, esi
call fcn.00410420
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 4]
xor edi, edi
test al, 0x10
mov byte [ebp + 0xb], 1
mov dword [esi + 0x18], 1
je 0x4150ee
mov ebx, dword [sym.imp.MSVCR80.dll_fseek]
push 2
push edi
push ecx
call ebx
mov ecx, dword [esi]
push ecx
call dword [sym.imp.MSVCR80.dll_ftell]
add esp, 0x10
cmp eax, 0xffffffff
mov dword [esi + 0x10], eax
jne 0x414f02
mov ecx, esi
call fcn.00410700
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esi]
push 0
push 0
push edx
call ebx
mov eax, dword [esi + 0x10]
mov ebx, 0x400
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x18], ebx
jge 0x414f2a
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x18], ebx
je 0x415191
push 0x42cdf0
push ebx
call fcn.00416f16
add esp, 8
test eax, eax
mov dword [ebp - 0x14], eax
je 0x414ee6
mov ecx, dword [esi]
push ecx
push 1
push ebx
push eax
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x10
cmp eax, 1
sete al
test al, al
mov byte [ebp + 0xb], al
je 0x4150dd
and dword [esi + 4], 0xfffffffa
xor ecx, ecx
cmp dword [0x42c278], ecx
je 0x414fe7
xor eax, eax
mov edx, dword [eax + 0x42c27c]
test edx, edx
jle 0x414fa8
jmp 0x414f83
mov ebx, dword [ebp - 0x18]
cmp edi, ebx
jge 0x414fa8
mov ebx, dword [ebp - 0x14]
mov edx, dword [eax + 0x42c278]
mov bl, byte [ebx + edi]
cmp bl, byte [edi + edx]
mov edx, dword [eax + 0x42c27c]
jne 0x414fa5
add edi, 1
cmp edi, edx
jl 0x414f80
mov ebx, dword [ebp - 0x18]
cmp edi, edx
je 0x414fc0
add ecx, 1
mov eax, ecx
xor edi, edi
shl eax, 4
cmp dword [eax + 0x42c278], edi
jne 0x414f70
jmp 0x414fe7
shl ecx, 4
mov eax, dword [ecx + 0x42c284]
or eax, dword [esi + 4]
cmp edi, 2
mov dword [esi + 4], eax
jne 0x414fd7
mov dword [esi + 0x18], edi
mov ecx, dword [ecx + 0x42c280]
push ecx
lea ecx, [esi + 0x3c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp ebx, edi
jle 0x414ffa
mov edx, dword [esi]
push 0
push edi
push edx
call dword [sym.imp.MSVCR80.dll_fseek]
add esp, 0xc
test edi, edi
jne 0x4150c1
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov eax, dword [ebp - 0x14]
push ebx
push eax
push ecx
mov eax, esp
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], esp
mov dword [eax], str.UTF_8
call fcn.0040fb20
lea ecx, [ebx + 1]
push ecx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::resize_unsigned_int_]
cmp dword [ebp - 0x20], 8
mov ecx, dword [ebp - 0x34]
jae 0x415047
lea ecx, [ebp - 0x34]
push ecx
mov eax, esp
mov dword [ebp - 0x10], esp
push ecx
mov dword [ebp - 0x5c], ebx
lea ecx, [ebp - 0x9c]
mov dword [eax], str.UTF_16
call fcn.00411140
push eax
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::resize_unsigned_int_]
push ecx
lea edx, [ebp - 0x38]
mov ecx, esp
mov dword [ebp - 0x10], esp
push edx
call fcn.004088c2
lea eax, [ebp - 0x54]
push eax
call fcn.00412020
add esp, 8
push eax
lea ecx, [esi + 0x3c]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 0
call fcn.004105a0
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esi + 0x50], 0
jne 0x4150dd
mov ecx, dword [ebp - 0x14]
cmp byte [ecx], 0x3c
jne 0x4150dd
push str.UTF_8
lea ecx, [esi + 0x3c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
mov edx, dword [ebp - 0x14]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
jmp 0x415187
test al, 0x20
je 0x415191
test al, 0x40
je 0x415114
push 2
push 0
push ecx
call dword [sym.imp.MSVCR80.dll_fseek]
mov eax, dword [esi]
push eax
call dword [sym.imp.MSVCR80.dll_ftell]
add esp, 0x10
mov dword [esi + 0x10], eax
xor ecx, ecx
cmp dword [0x42c278], ecx
je 0x415191
mov edx, dword [esi + 4]
xor eax, eax
test dword [eax + 0x42c284], edx
jne 0x41513d
add ecx, 1
mov eax, ecx
shl eax, 4
cmp dword [eax + 0x42c278], edi
jne 0x415123
jmp 0x415191
shl ecx, 4
mov ebx, ecx
mov edi, dword [ebx + 0x42c27c]
cmp edi, 2
jne 0x415150
mov dword [esi + 0x18], edi
mov ecx, dword [ebx + 0x42c280]
push ecx
lea ecx, [esi + 0x3c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp dword [esi + 0x10], 0
je 0x41516a
xor edi, edi
jmp 0x415191
mov edx, dword [esi]
mov eax, dword [ebx + 0x42c278]
push edx
push 1
push edi
push eax
call dword [sym.imp.MSVCR80.dll_fwrite]
add esp, 0x10
cmp eax, 1
sete byte [ebp + 0xb]
cmp byte [ebp + 0xb], 0
je 0x414e94
test byte [esi + 4], 0x40
je 0x41519f
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x14], ecx
jmp 0x4151a2
mov dword [esi + 0x14], edi
test edi, edi
je 0x4151d0
mov edx, dword [ebp - 0x1c]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov eax, esp
mov dword [ebp - 0x10], esp
push ecx
mov dword [eax], 0
mov eax, esp
mov dword [ebp - 0x10], esp
push edx
mov dword [eax], 0x421ce0
call fcn.00414c60
add esp, 0x18
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp + 0xb]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4