Function at 0x408fa0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x409f5c
mov eax, dword fs:[0]
push eax
sub esp, 0x450
mov eax, dword [0x41013c]
xor eax, esp
mov dword [esp + 0x44c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41013c]
xor eax, esp
push eax
lea eax, [esp + 0x464]
mov dword fs:[0], eax
mov dx, word [0x410180]
cmp dx, 0x834
mov eax, dword [esp + 0x474]
mov ebp, dword [esp + 0x478]
ja 0x4090d5
jne 0x40900b
cmp word [0x410182], 1
ja 0x4090d5
test eax, eax
mov esi, dword [ecx]
je 0x4090d5
mov ecx, eax
lea edi, [ecx + 1]
lea ebx, [ebx]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x409020
sub ecx, edi
cmp ecx, 4
jbe 0x4090d5
or ebx, 0xffffffff
cmp dword [esi + 4], ebx
jne 0x409132
cmp dword [esi], 0
jne 0x4090d5
cmp byte [eax], 0x2e
jne 0x409051
add eax, 1
mov cl, byte [eax]
cmp cl, 0x5c
je 0x40905d
cmp cl, 0x2f
jne 0x409060
add eax, 1
cmp dword [esi + 0x20], 0x10
jb 0x40906b
mov esi, dword [esi + 0xc]
jmp 0x40906e
add esi, 0xc
push eax
push esi
lea eax, [esp + 0x268]
push str._s_s
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
lea ecx, [esp + 0x270]
push 0x40e97c
push ecx
call dword [sym.imp.MSVCR80.dll_fopen]
mov esi, eax
add esp, 0x18
test esi, esi
je 0x4090d5
mov ebx, dword [sym.imp.MSVCR80.dll_fseek]
push 2
push 0
push esi
call ebx
add esp, 0xc
test eax, eax
push esi
jne 0x4090cc
call dword [sym.imp.MSVCR80.dll_ftell]
add esp, 4
mov edi, eax
push edi
mov ecx, ebp
call fcn.00408d50
test eax, eax
jne 0x409101
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x464]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x44c]
xor ecx, esp
call fcn.00409345
add esp, 0x45c
ret 8
push 0
push 0
push esi
call ebx
add esp, 0xc
test eax, eax
push esi
jne 0x4090cc
push 1
push edi
mov ecx, ebp
call fcn.00408dc0
push eax
call dword [sym.imp.MSVCR80.dll_fread]
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 0x14
mov eax, 1
jmp 0x4090d7
cmp dword [esi + 0x34], 0
jbe 0x4090d5
lea edx, [esp + 0x60]
sub edx, eax
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x409140
lea edx, [esp + 0x60]
push edx
mov ecx, esi
call fcn.00408e50
lea eax, [esp + 0x60]
push eax
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 edx, [esp + 0x20]
lea edi, [esi + 0x2c]
push edx
mov ecx, edi
mov dword [esp + 0x474], 0
call fcn.00408f30
lea ecx, [esp + 0x24]
mov dword [esp + 0x46c], ebx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [edi + 4]
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edi
call fcn.00406f90
test al, al
jne 0x4090d5
lea ecx, [esp + 0x1c]
call fcn.00408f00
xor ecx, ecx
add eax, 0x1c
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov edx, dword [eax]
push edx
mov ecx, esi
call fcn.00408e30
push 0x20
lea eax, [esp + 0x44]
push eax
mov ecx, esi
call fcn.00408de0
test eax, eax
je 0x4090d5
cmp dword [esp + 0x54], ebx
je 0x40928a
mov ecx, dword [esp + 0x5c]
cmp ecx, dword [esi + 0x24]
jle 0x409229
mov edx, dword [esi + 0x28]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x60]
mov dword [esi + 0x24], eax
mov ecx, dword [esp + 0x60]
push ecx
call fcn.00409340
add esp, 8
mov dword [esi + 0x28], eax
mov edx, dword [esp + 0x5c]
mov edi, dword [esi + 0x28]
push edx
push edi
mov ecx, esi
call fcn.00408de0
test eax, eax
je 0x4090d5
mov eax, dword [esp + 0x58]
push eax
mov ecx, ebp
mov dword [esp + 0x18], eax
call fcn.00408d50
mov eax, dword [esp + 0x5c]
push eax
push edi
lea ecx, [esp + 0x1c]
push ecx
mov ecx, ebp
call fcn.00408dc0
push eax
call fcn.00401c10
add esp, 0x10
test eax, eax
je 0x40927e
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x58]
je 0x40912b
mov ecx, ebp
call fcn.00408d20
jmp 0x4090d5
mov eax, dword [esp + 0x5c]
push eax
mov ecx, ebp
call fcn.00408d50
mov ecx, dword [esp + 0x5c]
push ecx
mov ecx, ebp
call fcn.00408dc0
push eax
mov ecx, esi
call fcn.00408de0
test eax, eax
jne 0x40912b
mov ecx, ebp
call fcn.00408d20
jmp 0x4090d5