Function at 0x407b20
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41f810
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x4262d0]
xor eax, esp
mov dword [esp + 0x3c], eax
push ebx
push esi
push edi
mov eax, dword [0x4262d0]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov esi, dword [0x429608]
xor ebx, ebx
mov edi, ecx
cmp dword [esi], ebx
je 0x407bd3
push ebx
push 0x422720
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
call fcn.004053a0
lea ecx, [esi + 0x1164]
lea eax, [esp + 0x10]
mov dword [esp + 0x58], ebx
call fcn.00407350
mov dword [esp + 0x58], 0xffffffff
cmp dword [esp + 0x28], 0x10
jb 0x407bad
mov eax, dword [esp + 0x14]
push eax
call fcn.0040ba9a
add esp, 4
lea ecx, [esi + 0x1158]
test ecx, ecx
je 0x407bc7
lea eax, [esi + 0x1160]
push str.There_is_already_a_PK2_opened.
jmp 0x407fc0
xor eax, eax
push str.There_is_already_a_PK2_opened.
jmp 0x407fc0
push 0x422b28
push edi
push esi
call fcn.0040b8cf
mov eax, dword [esi]
add esp, 0xc
cmp eax, ebx
jne 0x407c76
push ebx
push 0x422720
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
call fcn.004053a0
lea ecx, [esi + 0x1164]
lea eax, [esp + 0x10]
mov dword [esp + 0x58], 1
call fcn.00407350
mov dword [esp + 0x58], 0xffffffff
cmp dword [esp + 0x28], 0x10
jb 0x407c3e
mov edx, dword [esp + 0x14]
push edx
call fcn.0040ba9a
add esp, 4
lea eax, [esi + 0x1158]
test eax, eax
je 0x407c50
lea eax, [esi + 0x1160]
jmp 0x407c52
xor eax, eax
push 0x422adc
push ecx
push edi
push ecx
push str.Could_not_open_the_file__
push eax
call fcn.00405fe0
add esp, 0xc
push eax
call fcn.00405fe0
add esp, 0xc
jmp 0x407fc0
push eax
push 0x100
lea edi, [esi + 4]
push 1
push edi
call fcn.0040c332
add esp, 0x10
cmp eax, 0x100
je 0x407d05
mov ecx, dword [esi]
push ecx
call fcn.0040bdce
add esp, 4
push 0x422720
lea ecx, [esp + 0x14]
mov dword [esi], ebx
call fcn.00403b60
lea ecx, [esi + 0x1164]
lea eax, [esp + 0x10]
mov dword [esp + 0x58], 2
call fcn.00407350
mov dword [esp + 0x58], 0xffffffff
cmp dword [esp + 0x28], 0x10
jb 0x407cdf
mov edx, dword [esp + 0x14]
push edx
call fcn.0040ba9a
add esp, 4
lea eax, [esi + 0x1158]
test eax, eax
je 0x407cf9
lea eax, [esi + 0x1160]
push str.Could_not_read_in_the_PK2Header.
jmp 0x407fc0
xor eax, eax
push str.Could_not_read_in_the_PK2Header.
jmp 0x407fc0
mov ecx, dword [str.JoyMax_File_Manager__n]
mov edx, dword [0x422ae4]
xor eax, eax
mov dword [esp + 0x11], eax
mov dword [esp + 0x15], eax
mov dword [esp + 0x19], eax
mov dword [esp + 0x1d], eax
mov dword [esp + 0x21], eax
mov dword [esp + 0x25], eax
mov dword [esp + 0x29], eax
mov byte [esp + 0x2d], al
mov eax, dword [0x422ae8]
mov dword [esp + 0x10], ecx
mov ecx, dword [0x422aec]
mov dword [esp + 0x14], edx
mov edx, dword [0x422af0]
mov dword [esp + 0x18], eax
mov al, byte [0x422af4]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov byte [esp + 0x24], al
mov edx, 0x1e
mov eax, edi
lea ecx, [esp + 0x10]
lea esp, [esp]
mov edi, dword [ecx]
cmp edi, dword [eax]
jne 0x407f48
sub edx, 4
add eax, 4
add ecx, 4
cmp edx, 4
jae 0x407d70
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x407f48
mov al, byte [eax + 1]
cmp al, byte [ecx + 1]
jne 0x407f48
cmp dword [esi + 0x22], 0x1000002
je 0x407e30
mov ecx, dword [esi]
push ecx
call fcn.0040bdce
add esp, 4
push ebx
push 0x422720
lea ecx, [esp + 0x18]
mov dword [esi], ebx
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
call fcn.004053a0
lea ecx, [esi + 0x1164]
lea eax, [esp + 0x10]
mov dword [esp + 0x58], 4
call fcn.00407350
mov dword [esp + 0x58], 0xffffffff
cmp dword [esp + 0x28], 0x10
jb 0x407e0a
mov edx, dword [esp + 0x14]
push edx
call fcn.0040ba9a
add esp, 4
lea eax, [esi + 0x1158]
test eax, eax
je 0x407e24
lea eax, [esi + 0x1160]
push str.Invalid_PK2_version.
jmp 0x407fc0
xor eax, eax
push str.Invalid_PK2_version.
jmp 0x407fc0
mov eax, dword [esi]
push eax
call fcn.0040c6e2
add esp, 4
mov dword [esi + 0x108], eax
mov dword [esi + 0x10c], edx
cmp byte [esi + 0x26], bl
jne 0x407e53
mov al, 1
jmp 0x407fcb
xor eax, eax
lea ecx, [esi + 0x110]
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], eax
mov dword [esp + 0x39], eax
mov word [esp + 0x3d], ax
mov byte [esp + 0x3f], al
push ecx
lea eax, [esp + 0x34]
mov byte [esp + 0x34], bl
call fcn.00406f40
xor eax, eax
mov dword [esp + 0x33], eax
mov dword [esp + 0x37], eax
mov dword [esp + 0x3b], eax
mov byte [esp + 0x3f], al
lea ecx, [eax + 0x10]
lea eax, [esi + 0x27]
lea edx, [esp + 0x30]
sub edx, eax
lea esp, [esp]
mov edi, dword [eax + edx]
cmp edi, dword [eax]
jne 0x407eb9
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x407ea0
mov al, 1
jmp 0x407fcb
mov edx, dword [esi]
push edx
call fcn.0040bdce
add esp, 4
push ebx
mov edi, 0xf
push 0x422720
lea ecx, [esp + 0x38]
mov dword [esi], ebx
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
call fcn.004053a0
lea ecx, [esi + 0x1164]
lea eax, [esp + 0x30]
mov dword [esp + 0x58], 5
call fcn.00407350
mov dword [esp + 0x58], 0xffffffff
cmp dword [esp + 0x48], 0x10
jb 0x407f19
mov eax, dword [esp + 0x34]
push eax
call fcn.0040ba9a
add esp, 4
lea ecx, [esi + 0x1158]
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
test ecx, ecx
je 0x407f3f
lea eax, [esi + 0x1160]
push str.Invalid_Blowfish_key.
jmp 0x407fc0
xor eax, eax
push str.Invalid_Blowfish_key.
jmp 0x407fc0
mov edx, dword [esi]
push edx
call fcn.0040bdce
add esp, 4
push ebx
push 0x422720
lea ecx, [esp + 0x18]
mov dword [esi], ebx
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
call fcn.004053a0
lea ecx, [esi + 0x1164]
lea eax, [esp + 0x10]
mov dword [esp + 0x58], 3
call fcn.00407350
mov dword [esp + 0x58], 0xffffffff
cmp dword [esp + 0x28], 0x10
jb 0x407fa7
mov eax, dword [esp + 0x14]
push eax
call fcn.0040ba9a
add esp, 4
lea ecx, [esi + 0x1158]
test ecx, ecx
je 0x407fb9
lea eax, [esi + 0x1160]
jmp 0x407fbb
xor eax, eax
push str.Invalid_PK2_name.
push eax
call fcn.00405fe0
add esp, 8
xor al, al
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.0040b112
add esp, 0x4c
ret