Function at 0x4878d0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov esi, dword [ebp + 8]
call fcn.00410290
mov esi, eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 0
mov dword [esp + 8], esi
je 0x487900
mov edx, dword [eax + 0x1c]
xor ecx, ecx
cmp ecx, edx
sbb ecx, ecx
not ecx
and ecx, edx
mov dword [eax + 0x18], ecx
jmp 0x487910
mov edx, dword [eax + 4]
push 0
push 0
push edx
call fcn.006081d8
add esp, 0xc
cmp esi, 0x12
mov byte [ebp + 0x54], 1
mov byte [ebp + 0x55], 0
jae 0x487928
pop esi
mov eax, 3
pop ebp
pop ecx
ret 8
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
test edx, edx
push ebx
push edi
je 0x48796c
mov eax, dword [esi + 0x1c]
mov edi, 2
cmp eax, edi
jb 0x48794a
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 2]
cmp ebx, eax
jbe 0x487953
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x48798f
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 2
jmp 0x48798d
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 2
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487993
cmp dword [esi + 4], eax
jne 0x48798f
cmp dword [esi + 0xc], eax
je 0x487993
mov byte [ebp + 0x55], 1
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
test edx, edx
je 0x4879d5
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x4879b3
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x4879bc
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x4879f8
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x4879f6
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x4879fc
cmp dword [esi + 4], eax
jne 0x4879f8
cmp dword [esi + 0xc], eax
je 0x4879fc
mov byte [ebp + 0x55], 1
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487a3e
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487a1c
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487a25
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487a61
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487a5f
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487a65
cmp dword [esi + 4], eax
jne 0x487a61
cmp dword [esi + 0xc], eax
je 0x487a65
mov byte [ebp + 0x55], 1
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487aa7
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487a85
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487a8e
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487aca
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487ac8
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487ad2
cmp dword [esi + 4], eax
jne 0x487aca
cmp dword [esi + 0xc], eax
je 0x487ad2
mov byte [ebp + 0x55], 1
xor eax, eax
jmp 0x487ad6
mov eax, dword [esp + 0x18]
mov esi, dword [ebp + 8]
mov dword [ebp + 0x18], eax
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487b1b
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487af9
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487b02
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487b3e
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487b3c
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487b4f
cmp dword [esi + 4], eax
jne 0x487b3e
cmp dword [esi + 0xc], eax
je 0x487b4f
mov byte [ebp + 0x55], 1
pop edi
pop ebx
pop esi
mov eax, 3
pop ebp
pop ecx
ret 8
mov eax, dword [esp + 0x18]
cmp eax, 0xc
je 0x487b5d
cmp eax, 0x28
jl 0x487b42
xor edi, edi
cmp eax, 0x28
mov dword [ebp + 0x1c], edi
mov dword [ebp + 0x20], edi
mov dword [ebp + 0x24], 4
jl 0x487fdb
cmp dword [esp + 0x10], 0x36
jb 0x487b42
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
cmp edx, edi
je 0x487bbe
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487b9c
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487ba5
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487be1
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487bdf
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487be9
cmp dword [esi + 4], edi
jne 0x487be1
cmp dword [esi + 0xc], edi
je 0x487be9
mov byte [ebp + 0x55], 1
xor eax, eax
jmp 0x487bed
mov eax, dword [esp + 0x18]
mov esi, dword [ebp + 8]
mov dword [ebp], eax
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487c32
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487c10
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487c19
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487c55
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487c53
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487c5d
cmp dword [esi + 4], eax
jne 0x487c55
cmp dword [esi + 0xc], eax
je 0x487c5d
mov byte [ebp + 0x55], 1
xor eax, eax
jmp 0x487c61
mov eax, dword [esp + 0x18]
mov esi, dword [ebp + 8]
mov dword [ebp + 4], eax
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487ca6
mov eax, dword [esi + 0x1c]
mov edi, 2
cmp eax, edi
jb 0x487c84
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 2]
cmp ebx, eax
jbe 0x487c8d
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487cc9
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 2
jmp 0x487cc7
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 2
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487ccd
cmp dword [esi + 4], eax
jne 0x487cc9
cmp dword [esi + 0xc], eax
je 0x487ccd
mov byte [ebp + 0x55], 1
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487d0f
mov eax, dword [esi + 0x1c]
mov edi, 2
cmp eax, edi
jb 0x487ced
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 2]
cmp ebx, eax
jbe 0x487cf6
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487d32
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 2
jmp 0x487d30
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 2
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487d3a
cmp dword [esi + 4], eax
jne 0x487d32
cmp dword [esi + 0xc], eax
je 0x487d3a
mov byte [ebp + 0x55], 1
xor eax, eax
jmp 0x487d3f
movsx eax, word [esp + 0x18]
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], eax
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487d84
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487d62
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487d6b
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487da7
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487da5
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487daf
cmp dword [esi + 4], eax
jne 0x487da7
cmp dword [esi + 0xc], eax
je 0x487daf
mov byte [ebp + 0x55], 1
xor eax, eax
jmp 0x487db3
mov eax, dword [esp + 0x18]
mov esi, dword [ebp + 8]
mov dword [ebp + 0x20], eax
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487df8
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487dd6
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487ddf
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487e1b
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487e19
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487e1f
cmp dword [esi + 4], eax
jne 0x487e1b
cmp dword [esi + 0xc], eax
je 0x487e1f
mov byte [ebp + 0x55], 1
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487e61
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487e3f
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487e48
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487e84
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487e82
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487e88
cmp dword [esi + 4], eax
jne 0x487e84
cmp dword [esi + 0xc], eax
je 0x487e88
mov byte [ebp + 0x55], 1
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487eca
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487ea8
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487eb1
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487eed
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487eeb
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487ef1
cmp dword [esi + 4], eax
jne 0x487eed
cmp dword [esi + 0xc], eax
je 0x487ef1
mov byte [ebp + 0x55], 1
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487f33
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487f11
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487f1a
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487f56
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487f54
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x487f5e
cmp dword [esi + 4], eax
jne 0x487f56
cmp dword [esi + 0xc], eax
je 0x487f5e
mov byte [ebp + 0x55], 1
xor eax, eax
jmp 0x487f62
mov eax, dword [esp + 0x18]
mov esi, dword [ebp + 8]
mov dword [ebp + 0x1c], eax
mov edx, dword [esi + 0x14]
test edx, edx
je 0x487fa7
mov eax, dword [esi + 0x1c]
mov edi, 4
cmp eax, edi
jb 0x487f85
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 4]
cmp ebx, eax
jbe 0x487f8e
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x487fd2
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 4
jmp 0x487fcc
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x4881b5
cmp dword [esi + 4], eax
jne 0x487fd2
cmp dword [esi + 0xc], eax
je 0x4881b5
mov byte [ebp + 0x55], 1
jmp 0x4881b5
cmp dword [esp + 0x10], 0x1a
jb 0x487b42
mov esi, dword [ebp + 8]
mov dword [ebp + 0x24], 3
mov edx, dword [esi + 0x14]
cmp edx, edi
je 0x48802f
mov eax, dword [esi + 0x1c]
mov edi, 2
cmp eax, edi
jb 0x48800d
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 2]
cmp ebx, eax
jbe 0x488016
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x488052
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 2
jmp 0x488050
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 2
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x48805a
cmp dword [esi + 4], edi
jne 0x488052
cmp dword [esi + 0xc], edi
je 0x48805a
mov byte [ebp + 0x55], 1
xor eax, eax
jmp 0x48805f
movsx eax, word [esp + 0x18]
mov esi, dword [ebp + 8]
mov dword [ebp], eax
mov edx, dword [esi + 0x14]
test edx, edx
je 0x4880a4
mov eax, dword [esi + 0x1c]
mov edi, 2
cmp eax, edi
jb 0x488082
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 2]
cmp ebx, eax
jbe 0x48808b
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x4880c7
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 2
jmp 0x4880c5
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 2
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x4880cf
cmp dword [esi + 4], eax
jne 0x4880c7
cmp dword [esi + 0xc], eax
je 0x4880cf
mov byte [ebp + 0x55], 1
xor eax, eax
jmp 0x4880d4
movsx eax, word [esp + 0x18]
mov esi, dword [ebp + 8]
mov dword [ebp + 4], eax
mov edx, dword [esi + 0x14]
test edx, edx
je 0x488119
mov eax, dword [esi + 0x1c]
mov edi, 2
cmp eax, edi
jb 0x4880f7
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 2]
cmp ebx, eax
jbe 0x488100
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x48813c
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 2
jmp 0x48813a
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 2
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x488140
cmp dword [esi + 4], eax
jne 0x48813c
cmp dword [esi + 0xc], eax
je 0x488140
mov byte [ebp + 0x55], 1
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
test edx, edx
je 0x488182
mov eax, dword [esi + 0x1c]
mov edi, 2
cmp eax, edi
jb 0x488160
mov ecx, dword [esi + 0x18]
lea ebx, [ecx + 2]
cmp ebx, eax
jbe 0x488169
mov ecx, dword [esi + 0x18]
sub eax, ecx
mov edi, eax
je 0x4881a5
push edi
add ecx, edx
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.0060d1b0
add dword [esi + 0x18], edi
add esp, 0xc
cmp edi, 2
jmp 0x4881a3
mov ecx, dword [esi + 4]
push ecx
push 1
lea edx, [esp + 0x20]
push 2
push edx
call fcn.0060860a
add esp, 0x10
test eax, eax
jne 0x4881ad
cmp dword [esi + 4], eax
jne 0x4881a5
cmp dword [esi + 0xc], eax
je 0x4881ad
mov byte [ebp + 0x55], 1
xor eax, eax
jmp 0x4881b2
movsx eax, word [esp + 0x18]
mov dword [ebp + 0xc], eax
cmp byte [ebp + 0x55], 0
jne 0x487b42
mov eax, dword [ebp + 4]
test eax, eax
jge 0x4881cf
neg eax
mov dword [ebp + 4], eax
mov byte [ebp + 0x54], 0
mov eax, dword [ebp]
test eax, eax
jle 0x487b42
cmp eax, 0x3fff
jg 0x487b42
mov ecx, dword [ebp + 4]
test ecx, ecx
jle 0x487b42
cmp ecx, 0x3fff
jg 0x487b42
imul eax, ecx
cmp dword [esp + 0x1c], eax
pop edi
pop ebx
sbb eax, eax
pop esi
and eax, 3
pop ebp
pop ecx
ret 8