Function at 0x405e52
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [esp + 0x40]
mov dword [esp + 0x20], eax
mov ebx, dword [esp + 0x44]
mov ebp, dword [esp + 0x48]
mov edx, 0x436638
mov ecx, 5
cld
mov esi, ebx
mov edi, edx
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
jne 0x406132
mov eax, dword [esp + 0x4c]
cdq
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x20]
mov ecx, dword [edx + 0x60]
mov ebx, dword [edx + 0x64]
cmp dword [esp + 0x1c], ebx
jl 0x405eb3
jg 0x405eab
cmp eax, ecx
jbe 0x405eb3
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x18]
mov ecx, 0
test ebx, ebx
je 0x406224
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 4]
mov ecx, dword [eax]
mov esi, dword [esp + 0x20]
mov eax, dword [esi + 0x400c0]
mov edx, dword [esi + 0x400c4]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [esi + 4]
mov dword [esp], eax
call dword [ecx + 0x18]
test al, al
jne 0x405f02
mov dword [esp + 4], 0xfffffff6
mov dword [esp], esi
call fcn.00409528
mov edi, dword [esp + 0x20]
mov eax, dword [edi + 0x58]
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov eax, dword [eax + 8]
mov dword [esp], eax
call sub.msvcrt.dll__read
test eax, eax
jns 0x40610c
cmp dword [0x6fb4d0], 0
je 0x405f41
mov dword [esp + 4], 1
mov dword [esp], 0x6fb4f0
call sub.msvcrt.dll_longjmp
mov dword [esp], 0x40000
call sub.msvcrt.dll_malloc
test eax, eax
jne 0x405fe6
cmp dword [0x6fb4d0], 0
je 0x405f72
mov dword [esp + 4], 1
mov dword [esp], 0x6fb4f0
call sub.msvcrt.dll_longjmp
mov dword [esp], 0x40000
call fcn.00401942
mov ebx, eax
mov dword [esp], 0x40000
call fcn.00401942
mov esi, eax
mov dword [esp + 8], 0x40000
mov dword [esp + 4], 0x436000
mov dword [esp], ebx
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0040d56a
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error_encountered
mov dword [esp + 4], esi
mov dword [esp], 0
call sub.USER32.dll_MessageBoxW
sub esp, 0x10
call fcn.0040996a
mov dword [esp], 2
call sub.msvcrt.dll_exit
mov ebx, eax
mov dword [esp], 0x40000
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
jne 0x40608f
cmp dword [0x6fb4d0], 0
je 0x40601b
mov dword [esp + 4], 1
mov dword [esp], 0x6fb4f0
call sub.msvcrt.dll_longjmp
mov dword [esp], 0x40000
call fcn.00401942
mov ebx, eax
mov dword [esp], 0x40000
call fcn.00401942
mov esi, eax
mov dword [esp + 8], 0x40000
mov dword [esp + 4], 0x436000
mov dword [esp], ebx
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0040d56a
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error_encountered
mov dword [esp + 4], esi
mov dword [esp], 0
call sub.USER32.dll_MessageBoxW
sub esp, 0x10
call fcn.0040996a
mov dword [esp], 2
call sub.msvcrt.dll_exit
mov dword [ebx], 0x4f525245
mov dword [ebx + 4], 0x66203a52
mov dword [ebx + 8], 0x20656c69
mov dword [ebx + 0xc], 0x64616572
mov dword [ebx + 0x10], 0x65706f20
mov dword [ebx + 0x14], 0x69746172
mov dword [ebx + 0x18], 0x66206e6f
mov dword [ebx + 0x1c], 0x656c6961
mov word [ebx + 0x20], 0x64
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0040d56a
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error_encountered
mov dword [esp + 4], esi
mov dword [esp], 0
call sub.USER32.dll_MessageBoxW
sub esp, 0x10
call fcn.0040996a
mov dword [esp], 2
call sub.msvcrt.dll_exit
mov ecx, eax
test eax, eax
jle 0x406224
cdq
mov ebx, dword [esp + 0x20]
sub dword [ebx + 0x60], eax
sbb dword [ebx + 0x64], edx
add dword [ebx + 0x400c0], eax
adc dword [ebx + 0x400c4], edx
jmp 0x406224
mov edx, 0x43663d
mov ecx, 6
cld
mov esi, ebx
mov edi, edx
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
mov ecx, 0xfffffff8
cmp dl, al
jne 0x406224
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x6c]
mov ecx, 0xfffffff7
cmp eax, dword [edx + 0x74]
jg 0x406224
cmp dword [esp + 0x4c], 0
jle 0x406219
mov eax, dword [esp + 0x4c]
cdq
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x20]
mov ecx, dword [edx + 0x400b0]
mov ebx, dword [edx + 0x400b4]
cmp dword [esp + 0x1c], ebx
jl 0x4061af
jg 0x4061a7
cmp eax, ecx
jbe 0x4061af
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov esi, dword [esp + 0x20]
mov dword [esp], esi
call fcn.004057da
mov eax, ebx
cdq
sub dword [esi + 0x400b0], ebx
sbb dword [esi + 0x400b4], edx
mov eax, dword [esi + 0x400b4]
or eax, dword [esi + 0x400b0]
jne 0x406208
mov dword [esp], esi
call fcn.00405a98
mov eax, dword [esi + 0x6c]
inc eax
mov dword [esi + 0x6c], eax
cmp eax, dword [esi + 0x74]
jg 0x40621f
mov dword [esp + 4], 1
mov dword [esp], esi
call fcn.0040519e
add ebp, ebx
sub dword [esp + 0x4c], ebx
cmp dword [esp + 0x4c], 0
jg 0x40617e
mov ecx, dword [esp + 0x24]
jmp 0x406224
mov ecx, 0xfffffff7
mov eax, ecx
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret