Function at 0x4040c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408990
mov eax, dword fs:[0]
push eax
sub esp, 0xa64
mov eax, dword [0x40d04c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0xa68], esi
cmp dword [esi], 0
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [ebp - 0xa64], eax
jne 0x404122
lea eax, [esi + 0x1168]
push str.There_is_no_PK2_loaded_yet.
push eax
call section..text
add esp, 8
xor al, al
jmp 0x4045c5
mov ecx, edx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404140
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00401a30
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x28]
lea ebx, [ebp - 0x28]
cmp ecx, 0x10
mov dword [ebp - 4], 0
lea edi, [ebp - 0x28]
cmovae eax, edx
cmovae ebx, edx
add eax, dword [ebp - 0x18]
cmp ecx, 0x10
cmovae edi, edx
cmp edi, eax
je 0x4041a4
sub ebx, edi
mov esi, eax
movsx eax, byte [edi]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
mov byte [ebx + edi], al
add esp, 4
inc edi
cmp edi, esi
jne 0x404183
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0xa68]
mov edx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
lea eax, [ebp - 0x28]
cmp ecx, 0x10
lea edi, [ebp - 0x28]
cmovae eax, edx
cmovae edi, edx
add ebx, eax
lea edx, [ebp - 0x28]
cmp ecx, 0x10
cmovae edx, dword [ebp - 0x28]
cmp edx, ebx
je 0x4041e7
sub edi, edx
mov esi, 0x5c
nop dword [eax]
cmp byte [edx], 0x2f
movzx ecx, byte [edx]
cmove ecx, esi
mov byte [edi + edx], cl
inc edx
cmp edx, ebx
jne 0x4041d0
mov esi, dword [ebp - 0xa68]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 1
mov word [ebp - 0x58], 0x5c
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0xa60]
push eax
call fcn.00404990
add esp, 0xc
mov ecx, dword [ebp - 0x44]
mov byte [ebp - 4], 3
cmp ecx, 0x10
jb 0x404255
mov edx, dword [ebp - 0x58]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40424b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40450c
push ecx
push edx
call fcn.0040793c
add esp, 8
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x4c]
push eax
lea ecx, [esi + 0x1208]
call fcn.004035c0
mov ebx, dword [ebp - 0x44]
cmp byte [ebx + 0xd], 0
jne 0x4042be
cmp dword [ebx + 0x24], 0x10
lea edx, [ebx + 0x10]
jb 0x40427d
mov edx, dword [ebx + 0x10]
push dword [ebx + 0x20]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
push edx
cmovae eax, dword [ebp - 0x28]
push dword [ebp - 0x18]
push eax
call fcn.004037c0
shr eax, 0x1f
add esp, 0x10
test al, al
jne 0x4042be
cmp ebx, dword [esi + 0x1208]
je 0x4042be
mov edi, dword [ebp - 0xa64]
lea esi, [ebx + 0x28]
mov ecx, 0x20
mov bl, 1
rep movsd dword es:[edi], dword [esi]
jmp 0x4044cf
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
mov eax, dword [ebp - 0xa64]
mov byte [ebp - 4], 4
push 0
mov edx, dword [eax + 0x6a]
mov ecx, dword [eax + 0x6e]
mov eax, edx
or eax, ecx
jne 0x4042fd
push dword [esi + 0x10c]
push dword [esi + 0x108]
jmp 0x4042ff
push ecx
push edx
push dword [esi]
call fcn.00405350
add esp, 0x10
test eax, eax
je 0x404317
push str.Invalid_seek_index.
jmp 0x40447c
cmp dword [ebp - 0xa5c], 0
je 0x404477
mov eax, dword [ebp - 0xa60]
lea ecx, [ebp - 0x58]
mov eax, dword [eax]
add eax, 8
push eax
call fcn.00403880
lea ecx, [ebp - 0xa60]
mov byte [ebp - 4], 5
call fcn.004051e0
push dword [esi]
lea eax, [ebp - 0xa58]
push 0xa00
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 0xa00
jne 0x404595
xor edi, edi
lea ebx, [ebp - 0xa58]
cmp byte [esi + 0x26], 0
je 0x404394
push 0
push 0x80
push ebx
push 0
push 0x80
push ebx
lea ecx, [esi + 0x110]
call fcn.00402f50
cmp byte [ebx + 0x7e], 0
jne 0x40458e
cmp byte [ebx + 0x7f], 0
jne 0x40458e
cmp byte [ebx], 0
je 0x404414
lea eax, [ebx + 1]
push eax
lea ecx, [ebp - 0x40]
call fcn.00403d70
cmp dword [ebp - 0x2c], 0x10
lea eax, [ebp - 0x40]
mov edx, dword [ebp - 0x40]
cmovae eax, edx
setae cl
mov dword [ebp - 0xa6c], eax
mov eax, dword [ebp - 0x30]
test cl, cl
je 0x4043da
add eax, edx
jmp 0x4043e1
lea ecx, [ebp - 0x40]
add eax, ecx
mov edx, ecx
push dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
mov ecx, dword [ebp - 0xa6c]
push ecx
push eax
push edx
lea eax, [ebp - 0xa70]
push eax
call fcn.00403850
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00403400
add esp, 0x1c
test al, al
jne 0x404512
inc edi
sub ebx, 0xffffff80
cmp edi, 0x14
jl 0x404373
mov ecx, dword [ebp - 0x62]
mov eax, ecx
mov edx, dword [ebp - 0x5e]
or eax, edx
je 0x40457d
push 0
push edx
push ecx
push dword [esi]
call fcn.00405350
add esp, 0x10
test eax, eax
jne 0x404576
lea eax, [ebp - 0x58]
push eax
mov eax, dword [ebp - 0xa60]
lea ecx, [ebp - 0xa60]
push dword [eax]
call fcn.00403490
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 4
call fcn.00401470
cmp dword [ebp - 0xa5c], 0
jne 0x404324
push str.The_entry_does_not_exist
lea eax, [esi + 0x1168]
push eax
call section..text
add esp, 8
xor bl, bl
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x10
jb 0x4044bd
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4044b3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40450c
push ecx
push edx
call fcn.0040793c
add esp, 8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
lea ecx, [ebp - 0xa60]
call fcn.00403b40
mov ecx, dword [ebp - 0x14]
cmp ecx, 0x10
jb 0x4045c3
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4045b9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4045b9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
cmp dword [ebp - 0xa5c], 0
je 0x404548
cmp byte [ebx], 1
jne 0x404541
push 0
push dword [ebx + 0x6e]
push dword [ebx + 0x6a]
push dword [esi]
call fcn.00405350
add esp, 0x10
test eax, eax
je 0x40445e
push str.Invalid_seek_index.
jmp 0x40459b
push str.Invalid_entry__files_cannot_have_children_
jmp 0x40459b
mov edi, dword [ebp - 0xa64]
lea eax, [ebp - 0x28]
mov ecx, 0x20
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0xa68]
push ebx
push eax
call fcn.00403da0
lea ecx, [ebp - 0x58]
mov bl, 1
call fcn.00401470
jmp 0x40448d
push str.Invalid_seek_index_for_nextChain.
jmp 0x40459b
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 4
call fcn.00401470
jmp 0x404477
mov eax, str.The_padding_is_not_NULL._User_seek_error.
jmp 0x40459a
mov eax, str.Could_not_read_a_PK2EntryBlock_object
push eax
lea eax, [esi + 0x1168]
push eax
call section..text
add esp, 8
lea ecx, [ebp - 0x58]
xor bl, bl
call fcn.00401470
jmp 0x40448d
push ecx
push edx
call fcn.0040793c
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040794a
mov esp, ebp
pop ebp
ret 8