Function at 0x408420
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x409f22
mov eax, dword fs:[0]
push eax
sub esp, 0x280
mov eax, dword [0x41013c]
xor eax, esp
mov dword [esp + 0x27c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41013c]
xor eax, esp
push eax
lea eax, [esp + 0x294]
mov dword fs:[0], eax
mov esi, dword [ecx]
mov eax, dword [esi + 0x224]
mov ecx, dword [eax + 4]
mov ebp, dword [esp + 0x2a4]
mov ebx, dword [esp + 0x2a8]
lea edi, [esi + 0x220]
push ecx
mov ecx, edi
call fcn.00407c10
mov eax, dword [edi + 4]
mov dword [eax + 4], eax
mov eax, dword [edi + 4]
mov dword [edi + 8], 0
mov dword [eax], eax
mov eax, dword [edi + 4]
push ebp
lea ecx, [esi + 0x204]
mov dword [eax + 8], eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
lea ecx, [esp + 0x18]
mov dword [esi + 0x200], 0
call fcn.00408db0
test ebx, ebx
mov dword [esp + 0x29c], 0
je 0x4084ea
lea edx, [esp + 0x18]
push edx
push ebp
mov ecx, ebx
call fcn.00409070
test eax, eax
je 0x40853d
mov ebx, 1
mov dword [esi + 0x200], ebx
jmp 0x40858c
push 0x40e98c
push ebp
call dword [sym.imp.MSVCR80.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4087ca
mov ebx, dword [sym.imp.MSVCR80.dll_fseek]
push 2
push 0
push ebp
call ebx
add esp, 0xc
test eax, eax
push ebp
jne 0x408534
call dword [sym.imp.MSVCR80.dll_ftell]
add esp, 4
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], eax
call fcn.00408df0
test eax, eax
jne 0x408558
push ebp
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x29c], 0xffffffff
call fcn.00408dc0
xor eax, eax
jmp 0x4087e3
push 0
push 0
push ebp
call ebx
add esp, 0xc
test eax, eax
push ebp
jne 0x408534
mov eax, dword [esp + 0x18]
mov ebx, 1
push ebx
push eax
lea ecx, [esp + 0x24]
call fcn.00408e60
push eax
call dword [sym.imp.MSVCR80.dll_fread]
push ebp
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 0x14
lea ecx, [esp + 0x20]
call fcn.00408c40
push 0
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x2a4], bl
call fcn.00408cb0
lea ecx, [esp + 0x20]
call fcn.00408d40
test eax, eax
jne 0x408779
lea ecx, [ecx]
lea ecx, [esp + 0x20]
call fcn.00408d90
cmp eax, 0x23509490
lea ecx, [esp + 0x20]
jne 0x4087a2
call fcn.00408d90
mov dword [esp + 0x14], eax
movzx ecx, byte [esp + 0x15]
movzx edx, al
movzx eax, byte [edx + esi + 0x100]
mov dl, byte [ecx + esi + 0x100]
mov byte [esp + 0x14], al
movzx eax, byte [esp + 0x16]
mov cl, byte [eax + esi + 0x100]
mov byte [esp + 0x15], dl
movzx edx, byte [esp + 0x17]
movzx eax, byte [edx + esi + 0x100]
mov byte [esp + 0x16], cl
mov byte [esp + 0x17], al
mov ebp, dword [esp + 0x14]
cmp ebp, 0x40
jae 0x4087b4
push 0x40
lea ecx, [esp + 0x54]
push 0
push ecx
call sub.MSVCR80.dll_memset
add esp, 0xc
test ebp, ebp
jle 0x408674
push ebp
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x28]
call fcn.00408d50
test eax, eax
je 0x4087b4
mov ecx, ebp
lea eax, [esp + 0x50]
movzx edx, byte [eax]
mov dl, byte [edx + esi + 0x100]
mov byte [eax], dl
sub ecx, ebx
add eax, ebx
test ecx, ecx
jg 0x408660
lea ecx, [esp + 0x20]
call fcn.00408d90
mov dword [esp + 0x14], eax
movzx edx, byte [esp + 0x15]
movzx eax, al
movzx ecx, byte [eax + esi + 0x100]
mov al, byte [edx + esi + 0x100]
mov byte [esp + 0x14], cl
movzx ecx, byte [esp + 0x16]
mov dl, byte [ecx + esi + 0x100]
mov byte [esp + 0x15], al
movzx eax, byte [esp + 0x17]
movzx ecx, byte [eax + esi + 0x100]
mov byte [esp + 0x16], dl
mov byte [esp + 0x17], cl
mov ebp, dword [esp + 0x14]
cmp ebp, 0x200
jae 0x4087b4
push 0x200
lea edx, [esp + 0x94]
push 0
push edx
call sub.MSVCR80.dll_memset
add esp, 0xc
test ebp, ebp
jle 0x408724
push ebp
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x28]
call fcn.00408d50
test eax, eax
je 0x4087b4
mov ecx, ebp
lea eax, [esp + 0x90]
nop
movzx edx, byte [eax]
mov dl, byte [edx + esi + 0x100]
mov byte [eax], dl
sub ecx, ebx
add eax, ebx
test ecx, ecx
jg 0x408710
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x38]
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 + 0x90]
push ecx
lea edx, [esp + 0x38]
push edx
mov ecx, edi
mov byte [esp + 0x2a4], 2
call fcn.004082b0
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
lea ecx, [esp + 0x34]
mov byte [esp + 0x29c], bl
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x20]
call fcn.00408d40
test eax, eax
je 0x4085c0
lea ecx, [esp + 0x20]
mov byte [esp + 0x29c], 0
call fcn.00408c70
lea ecx, [esp + 0x18]
mov dword [esp + 0x29c], 0xffffffff
call fcn.00408dc0
mov eax, ebx
jmp 0x4087e3
mov byte [esp + 0x29c], 0
call fcn.00408c70
jmp 0x40853d
lea ecx, [esp + 0x20]
mov byte [esp + 0x29c], 0
call fcn.00408c70
jmp 0x40853d
lea ecx, [esp + 0x18]
mov dword [esp + 0x29c], 0xffffffff
call fcn.00408dc0
mov eax, 1
mov ecx, dword [esp + 0x294]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x27c]
xor ecx, esp
call fcn.00409415
add esp, 0x28c
ret 8