Function at 0x586508
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1c
push ebp
mov ebp, dword [esp + 0x24]
push esi
push edi
push 0x244
call fcn.0058a0a4
mov esi, eax
add esp, 4
test esi, esi
jne 0x586548
push 0x100
push 0x1003a39c
push ebx
call fcn.0058a258
add esp, 0xc
mov byte [ebx + 0xff], 0
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x1c
ret
push 0x244
push 0
push esi
call fcn.0058e6d8
push ebp
push 0x18
lea eax, [esp + 0x24]
push 1
push eax
call fcn.0058c95c
mov edi, eax
add esp, 0x1c
cmp edi, 0x18
je 0x5865d6
push ebp
call fcn.0058b859
add esp, 4
test eax, eax
je 0x5865ae
call fcn.0058a1a2
mov eax, dword [eax]
push eax
call fcn.0058b39f
push eax
push 0x1003a3a8
push 0x100
push ebx
call fcn.00589b7a
add esp, 0x14
push esi
call fcn.00589fc7
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x1c
ret
push edi
push 0x18
push 0x1003a3c8
push 0x100
push ebx
call fcn.00589b7a
add esp, 0x14
push esi
call fcn.00589fc7
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x1c
ret
mov eax, dword [esp + 0x10]
cmp eax, 0xa1b2c3d4
mov edi, eax
je 0x586651
cmp eax, 0xa1b2cd34
je 0x586659
and edi, 0xff0000
mov ecx, eax
mov edx, eax
and edx, 0xff00
shr ecx, 0x10
shl eax, 0x10
or edi, ecx
or edx, eax
shr edi, 8
shl edx, 8
or edi, edx
cmp edi, 0xa1b2c3d4
je 0x586641
cmp edi, 0xa1b2cd34
je 0x586641
push 0x1003a410
push 0x100
push ebx
call fcn.00589b7a
add esp, 0xc
push esi
call fcn.00589fc7
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x1c
ret
lea eax, [esp + 0x10]
mov dword [esi + 0x40], 1
call fcn.00586218
cmp edi, 0xa1b2cd34
jne 0x586662
mov dword [esi + 0x44], 0x18
jmp 0x586669
mov dword [esi + 0x44], 0x10
cmp word [esp + 0x14], 2
jae 0x586696
push 0x1003a428
push 0x100
push ebx
call fcn.00589b7a
add esp, 0xc
push esi
call fcn.00589fc7
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x1c
ret
mov eax, dword [esp + 0x18]
mov dword [esi + 0x28], eax
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x1c], ecx
mov edx, dword [esp + 0x24]
mov eax, dword [0x1003e14c]
and edx, 0x3ffffff
xor ecx, ecx
cmp eax, 0xffffffff
je 0x5866cd
cmp eax, edx
je 0x58670e
mov eax, dword [ecx*8 + 0x1003e154]
add ecx, 1
cmp eax, 0xffffffff
jne 0x5866ba
mov ecx, edx
mov dword [esi + 0x20], ecx
mov edx, dword [esp + 0x24]
and edx, 0xfc000000
cmp edi, 0xa1b2cd34
mov dword [esi + 0x24], edx
jne 0x5866f0
cmp ecx, 1
jne 0x5866f0
add dword [esi + 0x1c], 0xe
mov dword [esi + 0x3c], ebp
mov eax, dword [esp + 0x20]
add eax, 0x10
sub ecx, 1
mov dword [esi + 0xb0], eax
je 0x58671e
sub ecx, 9
je 0x586717
xor edi, edi
jmp 0x586723
mov ecx, dword [ecx*8 + 0x1003e148]
jmp 0x5866cf
mov edi, 0x15
jmp 0x586723
mov edi, 0xe
xor ebp, ebp
cmp eax, ebp
jge 0x586733
mov dword [esi + 0xb0], 0x8000
mov eax, dword [esi + 0xb0]
add eax, 4
push eax
call fcn.0058a0a4
add esp, 4
cmp eax, ebp
mov dword [esi + 0x54], eax
jne 0x586778
push 0x100
push 0x1003a39c
push ebx
call fcn.0058a258
add esp, 0xc
push esi
mov byte [ebx + 0xff], 0
call fcn.00589fc7
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x1c
ret
and edi, 3
sub eax, edi
add eax, 4
mov dword [esi + 0xb4], eax
movzx ecx, word [esp + 0x14]
mov dword [esi + 0x4c], ecx
movzx edx, word [esp + 0x16]
mov dword [esi + 0x50], edx
movzx eax, word [esp + 0x14]
sub eax, 2
je 0x5867ac
sub eax, 0x21d
je 0x5867b7
mov dword [esi + 0x48], ebp
jmp 0x5867d2
mov ax, word [esp + 0x16]
cmp ax, 3
jae 0x5867c0
mov dword [esi + 0x48], 1
jmp 0x5867d2
xor ecx, ecx
cmp ax, 3
setne cl
sub ecx, 1
and ecx, 2
mov dword [esi + 0x48], ecx
pop edi
mov dword [esi + 0xe0], ebp
mov dword [esi + 0xd0], 0x10018080
mov dword [esi + 0xd4], 0x10017650
mov dword [esi + 0xd8], 0x10010db0
mov dword [esi + 0xdc], 0x10017680
mov dword [esi + 0xe4], 0x100175c0
mov dword [esi + 0xe8], 0x100175c0
mov dword [esi + 0xec], 0x100175d0
mov dword [esi + 0xf0], 0x100175f0
mov dword [esi + 0xf4], 0x10017610
mov dword [esi + 0xf8], 0x10017630
mov dword [esi + 0xfc], 0x100176a0
mov dword [esi + 0x30], 1
mov eax, esi
pop esi
pop ebp
add esp, 0x1c
ret