Function at 0x401070
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x4c
push ebx
mov ebx, dword [esp + 0x54]
push ebp
push esi
push edi
push 0x4921c8
push ebx
call dword [0x485200]
mov ebp, eax
add esp, 8
test ebp, ebp
mov dword [esp + 0x18], ebp
jne 0x4010ac
push ebx
push 0x4921b4
call fcn.00445450
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov esi, dword [0x48520c]
push ebp
push 1
lea eax, [esp + 0x40]
push 8
push eax
call esi
push ebp
push 1
lea ecx, [esp + 0x2c]
push 4
push ecx
call esi
add esp, 0x20
mov ecx, 2
mov edi, str.PCDATA01
lea esi, [esp + 0x38]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x401100
push ebp
call dword [0x4851f0]
push ebx
push 0x492190
call fcn.00445450
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
call fcn.00401030
lea ecx, [eax + eax*8]
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], 1
lea edx, [eax + ecx*8]
lea ebx, [eax + edx*4]
shl ebx, 5
mov dword [ebx + 0x4998fc], eax
lea ebx, [ebx + 0x4998f8]
xor eax, eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x90], eax
mov dword [ebx + 0x2094], eax
mov dword [ebx + 0x2498], eax
mov esi, dword [0x48520c]
push ebp
push 1
lea eax, [esp + 0x40]
push 8
push eax
call esi
push ebp
push 1
lea ecx, [esp + 0x2c]
push 4
push ecx
call esi
add esp, 0x20
mov ecx, 2
mov edi, str.BASEDATA
lea esi, [esp + 0x38]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x401190
mov eax, dword [esp + 0x14]
push ebp
push 1
lea ecx, [esp + 0x58]
push eax
push ecx
call dword [0x48520c]
add esp, 0x10
jmp 0x40163a
mov ecx, 2
mov edi, str.ACTINDEX
lea esi, [esp + 0x38]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x4011dc
mov eax, dword [esp + 0x14]
push ebp
push 1
lea ecx, [esp + 0x34]
push eax
push ecx
call dword [0x48520c]
mov eax, dword [esp + 0x3c]
add esp, 0x10
cmp ax, 0x7d0
jae 0x4016a7
and eax, 0xffff
mov dword [ebx + 8], eax
mov dword [eax*4 + 0x5be904], ebx
jmp 0x40163a
mov ecx, 2
mov edi, str.PALETTE1
lea esi, [esp + 0x38]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x401299
push 0x200
call fcn.004225a0
mov ecx, dword [ebx + 0xc]
push 0x300
mov dword [ebx + ecx*4 + 0x10], eax
mov edx, dword [ebx + 0xc]
mov esi, dword [ebx + edx*4 + 0x10]
mov dword [esp + 0x38], esi
call fcn.004225e0
push ebp
mov edi, eax
push 1
push 0x300
push edi
call dword [0x48520c]
add esp, 0x18
mov eax, edi
mov dword [esp + 0x20], 0x100
mov cl, byte [eax]
mov dl, byte [eax + 1]
inc eax
and cl, 0xf8
mov byte [esp + 0x13], dl
inc eax
movzx di, cl
mov cl, byte [esp + 0x13]
mov dl, byte [eax]
and cl, 0xf8
inc eax
movzx cx, cl
shr dl, 3
shl edi, 5
movzx dx, dl
add edi, ecx
add esi, 2
lea ecx, [edx + edi*4]
mov word [esi - 2], cx
mov ecx, dword [esp + 0x20]
dec ecx
mov dword [esp + 0x20], ecx
jne 0x401238
mov eax, dword [esp + 0x30]
mov cx, word [eax]
mov dx, word [eax + 0x1fe]
mov word [eax], dx
mov word [eax + 0x1fe], cx
inc dword [ebx + 0xc]
jmp 0x40163a
mov ecx, 2
mov edi, str.PCX_DATA
lea esi, [esp + 0x38]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x4012da
mov ecx, dword [esp + 0x14]
push ecx
push ebp
call fcn.00412ae0
mov edx, dword [ebx + 0x90]
add esp, 8
mov dword [ebx + edx*4 + 0x94], eax
mov eax, dword [ebx + 0x90]
inc eax
mov dword [ebx + 0x90], eax
jmp 0x40163a
mov ecx, 2
mov edi, str.PCX_LZSS
lea esi, [esp + 0x38]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x4012fb
mov ecx, dword [esp + 0x14]
push ecx
push ebp
call fcn.00412e30
jmp 0x4012b8
mov ecx, 2
mov edi, str.PK0_LZSS
lea esi, [esp + 0x38]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x40131c
mov ecx, dword [esp + 0x14]
push ecx
push ebp
call fcn.00412eb0
jmp 0x4012b8
mov ecx, 2
mov edi, str.TGA_DATA
lea esi, [esp + 0x38]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x401340
mov ecx, dword [esp + 0x14]
push ecx
push ebp
call fcn.00412cb0
jmp 0x4012b8
mov ecx, 2
mov edi, str.TGA_LZSS
lea esi, [esp + 0x38]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x401364
mov ecx, dword [esp + 0x14]
push ecx
push ebp
call fcn.00412fc0
jmp 0x4012b8
mov ecx, 2
mov edi, str.BMP_DATA
lea esi, [esp + 0x38]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x401388
mov ecx, dword [esp + 0x14]
push ecx
push ebp
call fcn.00412c30
jmp 0x4012b8
mov ecx, 2
mov edi, str.BMP_LZSS
lea esi, [esp + 0x38]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x4013ac
mov ecx, dword [esp + 0x14]
push ecx
push ebp
call fcn.00412f40
jmp 0x4012b8
mov ecx, 2
mov edi, str.ACT_DATA
lea esi, [esp + 0x38]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x401680
mov ecx, dword [esp + 0x14]
push ebp
push 1
push ecx
push 0x4998c8
call dword [0x48520c]
mov ebp, dword [ebx + 0x2094]
push 0x82c
lea edx, [ebp + 1]
mov dword [ebx + 0x2094], edx
call fcn.004225a0
mov dword [ebx + ebp*4 + 0x2098], eax
mov ecx, dword [0x4998c8]
mov dword [eax], ecx
mov edx, dword [ebx + ebp*4 + 0x2098]
mov eax, dword [0x4998cc]
mov edi, 0x4998dc
mov dword [edx + 4], eax
mov ecx, dword [ebx + ebp*4 + 0x2098]
mov edx, dword [0x4998d0]
add esp, 0x14
mov dword [ecx + 8], edx
mov eax, dword [ebx + ebp*4 + 0x2098]
mov ecx, dword [0x4998d4]
mov dword [eax + 0xc], ecx
mov edx, dword [ebx + ebp*4 + 0x2098]
mov eax, dword [0x4998d8]
or ecx, 0xffffffff
mov dword [edx + 0x10], eax
mov edx, dword [ebx + ebp*4 + 0x2098]
xor eax, eax
add edx, 0x14
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x4998d4]
xor edi, edi
test eax, eax
jle 0x4014e5
mov esi, 0x2c
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x40]
push ecx
push 1
push 8
push edx
call dword [0x48520c]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
push eax
push 1
push 4
push ecx
call dword [0x48520c]
mov edx, dword [esp + 0x3c]
push edx
call fcn.004225a0
mov ecx, dword [ebx + ebp*4 + 0x2098]
mov edx, dword [esp + 0x3c]
push edx
push 1
mov dword [esi + ecx], eax
mov ecx, dword [ebx + ebp*4 + 0x2098]
mov eax, dword [esp + 0x48]
mov edx, dword [esi + ecx]
push eax
push edx
call dword [0x48520c]
mov eax, dword [0x4998d4]
add esp, 0x34
inc edi
add esi, 4
cmp edi, eax
jl 0x40147c
mov eax, dword [0x4998d8]
mov dword [esp + 0x20], 0
test eax, eax
jle 0x401636
mov esi, 0x42c
mov eax, dword [esp + 0x18]
mov edi, dword [0x48520c]
push eax
push 1
lea ecx, [esp + 0x48]
push 8
push ecx
call edi
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x2c]
push edx
push 1
push 4
push eax
call edi
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
push ecx
push 1
push edx
push 0x5be8f8
call edi
push 0x10
call fcn.004225a0
mov ecx, dword [ebx + ebp*4 + 0x2098]
mov dword [esi + ecx], eax
mov edx, dword [ebx + ebp*4 + 0x2098]
mov cx, word [0x5be8f8]
mov eax, dword [esi + edx]
mov word [eax], cx
mov edx, dword [ebx + ebp*4 + 0x2098]
mov cx, word [0x5be8fa]
mov eax, dword [esi + edx]
mov word [eax + 2], cx
mov edx, dword [ebx + ebp*4 + 0x2098]
mov cl, byte [0x5be8fc]
mov eax, dword [esi + edx]
mov byte [eax + 4], cl
mov edx, dword [ebx + ebp*4 + 0x2098]
mov cl, byte [0x5be8fd]
mov eax, dword [esi + edx]
mov byte [eax + 5], cl
mov edx, dword [ebx + ebp*4 + 0x2098]
mov cx, word [0x5be8fe]
mov eax, dword [esi + edx]
mov word [eax + 6], cx
mov edx, dword [ebx + ebp*4 + 0x2098]
mov cl, byte [0x5be900]
mov eax, dword [esi + edx]
mov edx, dword [esp + 0x4c]
push edx
push 1
mov byte [eax + 8], cl
lea eax, [esp + 0x84]
push 8
push eax
call edi
mov ecx, dword [esp + 0x5c]
add esp, 0x44
lea edx, [esp + 0x24]
push ecx
push 1
push 4
push edx
call edi
mov eax, dword [esp + 0x34]
push eax
call fcn.004225a0
mov ecx, dword [ebx + ebp*4 + 0x2098]
mov edx, dword [esi + ecx]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x2c]
mov edx, dword [ebx + ebp*4 + 0x2098]
mov ecx, dword [esp + 0x38]
push eax
push 1
mov eax, dword [esi + edx]
push ecx
mov ecx, dword [eax + 0xc]
push ecx
call edi
mov eax, dword [esp + 0x44]
mov ecx, dword [0x4998d8]
add esp, 0x24
inc eax
add esi, 4
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x4014ff
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
inc eax
cmp eax, 0x1000
mov dword [esp + 0x28], eax
jle 0x401140
push ebp
call dword [0x4851f0]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x68]
push edx
push eax
push ecx
push 0x4920e4
call fcn.00445450
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov ecx, 2
mov edi, str.FILE_END
lea esi, [esp + 0x38]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x4016ca
mov eax, dword [esp + 0x14]
push 1
push eax
push ebp
call dword [0x4851fc]
add esp, 0xc
jmp 0x40163a
push ebp
call dword [0x4851f0]
mov edx, dword [esp + 0x64]
push edx
push 0x4920bc
call fcn.00445450
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
push ebp
call dword [0x4851f0]
mov eax, dword [esp + 0x38]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret