Function at 0x408380
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x409e52
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.00407b70
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.00408d10
test ebx, ebx
mov dword [esp + 0x29c], 0
je 0x40844a
lea edx, [esp + 0x18]
push edx
push ebp
mov ecx, ebx
call fcn.00408fa0
test eax, eax
je 0x40849d
mov ebx, 1
mov dword [esi + 0x200], ebx
jmp 0x4084ec
push 0x40e97c
push ebp
call dword [sym.imp.MSVCR80.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x40872a
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 0x408494
call dword [sym.imp.MSVCR80.dll_ftell]
add esp, 4
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], eax
call fcn.00408d50
test eax, eax
jne 0x4084b8
push ebp
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x29c], 0xffffffff
call fcn.00408d20
xor eax, eax
jmp 0x408743
push 0
push 0
push ebp
call ebx
add esp, 0xc
test eax, eax
push ebp
jne 0x408494
mov eax, dword [esp + 0x18]
mov ebx, 1
push ebx
push eax
lea ecx, [esp + 0x24]
call fcn.00408dc0
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.00408ba0
push 0
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x2a4], bl
call fcn.00408c10
lea ecx, [esp + 0x20]
call fcn.00408ca0
test eax, eax
jne 0x4086d9
lea ecx, [ecx]
lea ecx, [esp + 0x20]
call fcn.00408cf0
cmp eax, 0x23509490
lea ecx, [esp + 0x20]
jne 0x408702
call fcn.00408cf0
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 0x408714
push 0x40
lea ecx, [esp + 0x54]
push 0
push ecx
call sub.MSVCR80.dll_memset
add esp, 0xc
test ebp, ebp
jle 0x4085d4
push ebp
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x28]
call fcn.00408cb0
test eax, eax
je 0x408714
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 0x4085c0
lea ecx, [esp + 0x20]
call fcn.00408cf0
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 0x408714
push 0x200
lea edx, [esp + 0x94]
push 0
push edx
call sub.MSVCR80.dll_memset
add esp, 0xc
test ebp, ebp
jle 0x408684
push ebp
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x28]
call fcn.00408cb0
test eax, eax
je 0x408714
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 0x408670
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.00408210
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.00408ca0
test eax, eax
je 0x408520
lea ecx, [esp + 0x20]
mov byte [esp + 0x29c], 0
call fcn.00408bd0
lea ecx, [esp + 0x18]
mov dword [esp + 0x29c], 0xffffffff
call fcn.00408d20
mov eax, ebx
jmp 0x408743
mov byte [esp + 0x29c], 0
call fcn.00408bd0
jmp 0x40849d
lea ecx, [esp + 0x20]
mov byte [esp + 0x29c], 0
call fcn.00408bd0
jmp 0x40849d
lea ecx, [esp + 0x18]
mov dword [esp + 0x29c], 0xffffffff
call fcn.00408d20
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.00409345
add esp, 0x28c
ret 8