Function at 0x410d30
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x420769
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x420
push esi
push edi
mov esi, dword [esp + 0x43c]
mov ecx, 8
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
mov ecx, 0x100
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov dword [esp + 0x430], 0
test esi, esi
je 0x410d82
mov eax, esi
push eax
mov eax, dword [0x428564]
push eax
lea ecx, [esp + 0x30]
push str._s_016s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [esp + 0x38]
push 0x426068
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x410dde
test esi, esi
je 0x410dd7
mov al, byte [esi - 1]
test al, al
je 0x410dcd
cmp al, 0xff
je 0x410dcd
dec al
mov byte [esi - 1], al
xor al, al
jmp 0x410ec4
dec esi
push esi
call fcn.0041f590
add esp, 4
xor al, al
jmp 0x410ec4
push ebx
push ebp
push edi
push 0x1c
lea eax, [esp + 0x18]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
mov ebx, dword [esp + 0x450]
not ecx
dec ecx
mov ebp, ecx
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, ebp
jae 0x410e23
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x410e49
mov al, byte [ecx - 1]
test al, al
je 0x410e49
cmp al, 0xff
je 0x410e49
test ebp, ebp
jne 0x410e6f
dec al
push ebp
mov byte [ecx - 1], al
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x410ea0
test ebp, ebp
jne 0x410e59
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x410ea0
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x410e65
cmp eax, ebp
jae 0x410e78
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebx + 4]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov esi, dword [esp + 0x444]
mov dword [ebx + 8], ebp
mov byte [eax + ebp], 0
pop ebp
pop ebx
test esi, esi
je 0x410ec2
mov al, byte [esi - 1]
test al, al
je 0x410eb8
cmp al, 0xff
je 0x410eb8
dec al
mov byte [esi - 1], al
jmp 0x410ec2
dec esi
push esi
call fcn.0041f590
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x428]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x42c
ret 0x14