Function at 0x478f50
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
xor ecx, ecx
cmp dword [ebx + 0x114], ecx
lea eax, [ebx + 0x114]
setne cl
mov dword [ebp - 0x18], eax
push esi
push edi
mov eax, ecx
mov ecx, dword [edx + 8]
xor edx, edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], ecx
cmp byte [ebx + 0x120], dl
je 0x478f8d
mov edx, 1
test eax, eax
je 0x478f9b
cmp dword [ebx + 0x11c], 0
je 0x478f9b
inc edx
xor eax, eax
test ecx, ecx
jle 0x478fc9
xor esi, esi
test eax, eax
js 0x4791d6
cmp eax, ecx
jge 0x4791d6
mov edi, dword [ebp + 0x10]
mov edi, dword [edi + 4]
cmp dword [edi + esi + 0x24], 0
je 0x478fc1
inc edx
inc eax
add esi, 0x28
cmp eax, ecx
jl 0x478fa3
movzx eax, word [ebx + 0xa]
mov esi, dword [ebp + 8]
lea edi, [ebx + 0xa]
add eax, 3
shl eax, 4
push esi
mov dword [ebx + 0x1c], eax
shl ecx, 4
add eax, ecx
push 2
mov dword [ebx + 0x20], eax
lea eax, [eax + edx*8]
push 1
push ebx
mov dword [ebx + 0x18], 0x30
mov dword [ebx + 0x24], eax
call fcn.005bfae8
push esi
push 2
lea ecx, [ebx + 2]
push 1
push ecx
call fcn.005bfae8
push esi
push 2
push 1
push edi
call fcn.005bfae8
push esi
push 2
lea edx, [ebx + 0xc]
push 1
push edx
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea eax, [ebx + 0xe]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [ebx + 0x10]
push 1
push ecx
call fcn.005bfae8
push esi
push 2
lea edx, [ebx + 0x12]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [ebx + 0x14]
push 1
push eax
call fcn.005bfae8
add esp, 0x40
push esi
push 4
lea eax, [ebx + 0x18]
push 1
push eax
call fcn.005bfae8
push esi
push 4
lea eax, [ebx + 0x1c]
push 1
push eax
call fcn.005bfae8
push esi
push 4
lea eax, [ebx + 0x20]
push 1
push eax
call fcn.005bfae8
push esi
push 4
push 1
lea eax, [ebx + 0x24]
push eax
call fcn.005bfae8
add esp, 0x40
push esi
push 4
lea ecx, [ebx + 0x28]
push 1
push ecx
call fcn.005bfae8
push esi
push 4
lea edx, [ebx + 0x2c]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [ebx + 4]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [ebx + 6]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 1
lea edx, [ebx + 8]
push 1
push edx
call fcn.005bfae8
push esi
push 3
push 1
push 0x6052f8
call fcn.005bfae8
xor eax, eax
add esp, 0x20
mov dword [ebp - 4], 0
cmp ax, word [edi]
jae 0x479199
lea edi, [ebx + 0x34]
lea esp, [esp]
push esi
push 1
lea ecx, [edi - 4]
push 1
push ecx
call fcn.005bfae8
push esi
push 1
lea edx, [edi - 3]
push 1
push edx
call fcn.005bfae8
push esi
push 2
push 1
push edi
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 2]
push 1
push eax
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea ecx, [edi + 4]
push 1
push ecx
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 6]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 8]
push 1
push eax
call fcn.005bfae8
push esi
push 4
lea ecx, [edi + 0xc]
push 1
push ecx
call fcn.005bfae8
mov eax, dword [ebp - 4]
movzx edx, word [ebx + 0xa]
inc eax
add esp, 0x40
add edi, 0x14
mov dword [ebp - 4], eax
cmp eax, edx
jl 0x479110
xor ecx, ecx
mov dword [ebp - 4], ecx
cmp dword [ebp - 8], ecx
jle 0x4798cd
mov dword [ebp - 0x10], ecx
lea ebx, [ebx]
test ecx, ecx
js 0x4791d6
mov eax, dword [ebp + 0x10]
cmp ecx, dword [eax + 8]
jge 0x4791d6
mov edi, dword [eax + 4]
add edi, dword [ebp - 0x10]
movzx eax, byte [edi]
dec eax
cmp eax, 0xf
ja case.0x4791cf.10
jmp dword [eax*4 + 0x479ac0]
call fcn.004a815b
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 2]
push 1
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 0xc]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 1
lea edx, [edi + 0xd]
push 1
push edx
call fcn.005bfae8
push esi
push 1
lea eax, [edi + 0xe]
push 1
push eax
call fcn.005bfae8
push esi
push 3
lea ecx, [edi + 0xf]
push 1
push ecx
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 0xa]
push 1
push edx
call fcn.005bfae8
add esp, 0x40
push esi
push 1
lea eax, [edi + 0x12]
push 1
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 0x13]
push 1
push ecx
call fcn.005bfae8
push esi
push 1
jmp 0x47989c
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 2]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 0x14]
push 1
push eax
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea ecx, [edi + 0xa]
push 1
push ecx
call fcn.005bfae8
push esi
push 7
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 1
push 1
add edi, 7
push edi
call fcn.005bfae8
add esp, 0x30
jmp case.0x4791cf.10
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 1]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 2]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [edi + 4]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea edx, [edi + 8]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 0xa]
push 1
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 0xe]
push 1
push ecx
call fcn.005bfae8
push esi
push 3
push 1
lea edx, [edi + 0xf]
push edx
call fcn.005bfae8
add esp, 0x40
push esi
push 1
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 1
push 1
add edi, 7
push edi
call fcn.005bfae8
add esp, 0x20
jmp case.0x4791cf.10
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
lea eax, [edi + 1]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [edi + 2]
push 1
push ecx
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 4]
push 1
push edx
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea eax, [edi + 8]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [edi + 0xa]
push 1
push ecx
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 0xe]
push 1
push edx
call fcn.005bfae8
push esi
push 3
lea eax, [edi + 0xf]
push 1
push eax
call fcn.005bfae8
add esp, 0x40
push esi
push 1
push 1
lea ecx, [edi + 0xc]
push ecx
jmp 0x47935c
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 1]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 2]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [edi + 4]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea edx, [edi + 8]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 0xa]
push 1
push eax
call fcn.005bfae8
push esi
push 1
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 3
push 1
lea ecx, [edi + 0xf]
push ecx
jmp 0x47934a
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 1]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 2]
push 1
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 0xc]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 1
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 0xe]
push 1
push edx
call fcn.005bfae8
push esi
push 3
lea eax, [edi + 0xf]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [edi + 0xa]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 3
jmp 0x479355
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 2]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 0x14]
push 1
push eax
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea ecx, [edi + 0xa]
push 1
push ecx
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 0x16]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 0x18]
push 1
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 6]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 2
jmp 0x479355
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 1]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 2]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [edi + 4]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea edx, [edi + 8]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 0xa]
push 1
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 0xd]
push 1
push ecx
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 0x12]
push 1
push edx
call fcn.005bfae8
add esp, 0x40
push esi
push 1
lea eax, [edi + 0x13]
push 1
push eax
call fcn.005bfae8
movzx ecx, byte [edi + 0xf]
shr cl, 3
movzx edx, cl
shl dx, 6
movzx eax, dx
mov dword [ebp - 0xc], eax
movzx ecx, byte [edi + 0x10]
shr cl, 2
movzx edx, cl
or dx, ax
shl dx, 5
movzx eax, dx
mov dword [ebp - 0xc], eax
movzx ecx, byte [edi + 0x11]
push esi
shr cl, 3
push 2
movzx edx, cl
or word [ebp - 0xc], dx
push 1
lea eax, [ebp - 0xc]
push eax
jmp 0x4792c4
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 1]
push 1
push ecx
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 2]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 0x14]
push 1
push eax
call fcn.005bfae8
add esp, 0x40
push esi
push 1
lea ecx, [edi + 0xe]
push 1
push ecx
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 0xf]
push 1
push edx
call fcn.005bfae8
push esi
push 1
lea eax, [edi + 0x10]
push 1
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 0x11]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea edx, [edi + 0xa]
push 1
push edx
call fcn.005bfae8
push esi
push 1
lea eax, [edi + 6]
push 1
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 0x12]
push 1
push ecx
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 0x13]
push 1
push edx
call fcn.005bfae8
add esp, 0x40
push esi
push 1
push 1
add edi, 7
push edi
call fcn.005bfae8
add esp, 0x10
jmp case.0x4791cf.10
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 2]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [edi + 0x14]
push 1
push ecx
call fcn.005bfae8
add esp, 0x40
push esi
push 2
lea edx, [edi + 0xa]
push 1
push edx
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 0x16]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [edi + 0x18]
push 1
push ecx
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 6]
push 1
push edx
call fcn.005bfae8
add esp, 0x40
push esi
push 2
jmp 0x479355
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
lea eax, [edi + 1]
push 1
push eax
call fcn.005bfae8
push esi
push 2
lea ecx, [edi + 2]
push 1
push ecx
call fcn.005bfae8
push esi
push 1
lea edx, [edi + 0xc]
push 1
push edx
call fcn.005bfae8
add esp, 0x40
push esi
push 1
lea eax, [edi + 0xd]
push 1
push eax
call fcn.005bfae8
mov al, byte [edi + 0xe]
and al, 0xf
add esp, 0x10
mov byte [ebp + 0xf], al
cmp byte [edi + 0xf], 0
je 0x4797c5
or al, 0x10
mov byte [ebp + 0xf], al
cmp byte [edi + 0x10], 0
je 0x4797d0
or al, 0x20
mov byte [ebp + 0xf], al
cmp byte [edi + 0x11], 0
je 0x4797db
or al, 0x40
mov byte [ebp + 0xf], al
push esi
push 1
lea ecx, [ebp + 0xf]
push 1
push ecx
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 4]
push 1
push edx
call fcn.005bfae8
mov al, byte [edi + 8]
push esi
push 1
lea ecx, [ebp + 0xf]
push 1
push ecx
mov byte [ebp + 0xf], al
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 0xa]
push 1
push edx
call fcn.005bfae8
add esp, 0x40
push esi
push 1
lea eax, [edi + 6]
push 1
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [edi + 0x12]
push 1
push ecx
call fcn.005bfae8
push esi
push 1
push 1
lea edx, [edi + 0x13]
push edx
jmp 0x4798a3
push esi
push 1
push 1
push edi
call fcn.005bfae8
push esi
push 1
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 2
lea eax, [edi + 2]
push 1
push eax
call fcn.005bfae8
push esi
push 1
push 1
push 0x6052f8
call fcn.005bfae8
add esp, 0x40
push esi
push 1
lea ecx, [edi + 6]
push 1
push ecx
call fcn.005bfae8
push esi
push 2
lea edx, [edi + 0xa]
push 1
push edx
call fcn.005bfae8
push esi
push 7
push 1
push 0x6052f8
call fcn.005bfae8
push esi
push 1
push 1
add edi, 7
push edi
call fcn.005bfae8
add esp, 0x40
mov ecx, dword [ebp - 4]
add dword [ebp - 0x10], 0x28
inc ecx
mov dword [ebp - 4], ecx
cmp ecx, dword [ebp - 8]
jl 0x4791b0
cmp byte [ebx + 0x120], 0
lea eax, [ebx + 0x120]
je 0x479918
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4798e0
sub eax, edx
inc eax
push esi
or eax, 0x2000000
push 1
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push 4
push eax
call fcn.005bfae8
push esi
push 1
lea ecx, [ebp - 0x10]
push 4
push ecx
mov dword [ebp - 0x10], 0
call fcn.005bfae8
add esp, 0x20
cmp dword [ebp - 0x14], 0
je 0x479949
cmp dword [ebx + 0x11c], 0
je 0x479949
mov edx, dword [ebp - 0x18]
push esi
push 4
push 1
push edx
call fcn.005bfae8
push esi
push 4
lea eax, [ebx + 0x118]
push 1
push eax
call fcn.005bfae8
add esp, 0x20
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [ebp - 8], eax
jle 0x4799a5
mov dword [ebp - 0x10], eax
test eax, eax
js 0x4791d6
mov ecx, dword [ebp + 0x10]
cmp eax, dword [ecx + 8]
jge 0x4791d6
mov edi, dword [ecx + 4]
add edi, dword [ebp - 0x10]
cmp dword [edi + 0x24], 0
je 0x479998
push esi
push 4
lea ecx, [edi + 0x1c]
push 1
push ecx
call fcn.005bfae8
push esi
push 4
push 1
add edi, 0x20
push edi
call fcn.005bfae8
mov eax, dword [ebp - 4]
add esp, 0x20
add dword [ebp - 0x10], 0x28
inc eax
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 8]
jl 0x479956
cmp byte [ebx + 0x120], 0
lea eax, [ebx + 0x120]
je 0x4799d4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4799b7
sub eax, edx
push esi
inc eax
push 1
push eax
lea eax, [ebx + 0x120]
push eax
call fcn.005bfae8
add esp, 0x10
cmp dword [ebp - 0x14], 0
je 0x4799fb
mov ebx, dword [ebx + 0x11c]
test ebx, ebx
je 0x4799fb
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
push esi
and eax, 0xffffff
push eax
push 1
push ebx
call fcn.005bfae8
add esp, 0x10
xor ebx, ebx
cmp dword [ebp - 8], ebx
jle 0x479a43
xor edi, edi
test ebx, ebx
js 0x4791d6
mov eax, dword [ebp + 0x10]
cmp ebx, dword [eax + 8]
jge 0x4791d6
mov eax, dword [eax + 4]
mov ecx, dword [eax + edi + 0x24]
test ecx, ecx
je 0x479a3a
mov edx, dword [eax + edi + 0x1c]
push esi
and edx, 0xffffff
push edx
push 1
push ecx
call fcn.005bfae8
add esp, 0x10
inc ebx
add edi, 0x28
cmp ebx, dword [ebp - 8]
jl 0x479a04
push 0x19000
call fcn.005bb17a
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x479ab4
push esi
mov dword [ebp + 0x10], 0
call fcn.005bfc87
add esp, 4
push esi
push 0x19000
push 1
push ebx
call fcn.005bc8fb
mov edi, eax
add esp, 0x10
test edi, edi
jle 0x479a93
push edi
lea eax, [ebp + 0x10]
push ebx
push eax
call fcn.004205b0
add esp, 0xc
cmp edi, 0x19000
je 0x479a66
push 0
push 0x2e
push esi
call fcn.005bcb9e
push esi
push 1
lea ecx, [ebp + 0x10]
push 2
push ecx
call fcn.005bfae8
push ebx
call fcn.005bb20e
add esp, 0x20
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret