Function at 0x513890
Capabilities:
Inspect section memory permissions

Disassembly:
cmp dword [eax + 4], ebx
jne 0x51387c
cmp dword [eax + 0xc], ebx
je 0x51391f
mov edi, dword [eax + 0xc]
add edi, esi
push edi
call dword [ebp - 0xc0]
mov dword [ebp + 0xc], eax
call fcn.005132d7
xchg ebx, eax
pushfd
mov ebp, 0xc5d395a
jne 0x5138ab
push edi
call dword [ebp - 0xb8]
cmp eax, ebx
mov dword [ebp + 0xc], eax
je 0x513ac6
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + 0x10]
mov eax, dword [eax]
cmp eax, ebx
lea edi, [ecx + esi]
jne 0x5138bf
mov dword [ebp + 0x10], edi
jmp 0x5138c4
add eax, esi
mov dword [ebp + 0x10], eax
call fcn.005132d7
and edx, ecx
mov eax, 0x10458bb9
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
cmp eax, ebx
je 0x51390d
test eax, 0x80000000
lea ecx, [eax + esi]
je 0x5138e8
and eax, 0xffff
push eax
jmp 0x5138ec
add ecx, 2
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0051329c
add esp, 0xc
cmp edi, ebx
mov dword [edi], eax
je 0x513ac6
add edi, 4
add dword [ebp + 0x10], 4
jmp 0x5138cd
add dword [ebp - 0x44], 0x14
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp - 0x44]
jmp 0x51386e
call fcn.005132d7
movsd dword es:[edi], dword [esi]
xor byte [eax], bl
mov eax, dword [0xa0878b]
add byte [eax], al
cmp eax, ebx
je 0x51398b
add eax, esi
cmp dword [eax], ebx
je 0x51398b
mov edx, dword [eax + 4]
lea ecx, [eax + 8]
add edx, eax
mov dword [ebp + 8], ecx
cmp ecx, edx
jae 0x513986
mov ecx, dword [ebp + 8]
movzx ecx, word [ecx]
mov edx, ecx
and edx, 0xf000
cmp edx, 0x3000
jne 0x513970
and ecx, 0xfff
mov edx, esi
sub edx, dword [edi + 0x34]
add ecx, esi
add ecx, dword [eax]
add dword [ecx], edx
jmp 0x513978
cmp edx, ebx
jne 0x513ac6
mov ecx, dword [eax + 4]
add dword [ebp + 8], 2
add ecx, eax
cmp dword [ebp + 8], ecx
jb 0x513947
add eax, dword [eax + 4]
jmp 0x513934
mov dword [ebp + 0xc], ebx
jmp 0x513996
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp + 0xc]
cmp ax, word [edi + 6]
jne 0x5139ae
mov edx, dword [ebp - 0xb4]
xor ecx, ecx
mov edi, 0x60000000
jmp 0x5139cc
movzx eax, ax
lea eax, [eax + eax*4]
mov ecx, dword [edi + eax*8 + 0x104]
mov edx, dword [edi + eax*8 + 0x108]
lea eax, [edi + eax*8 + 0xf8]
mov edi, dword [eax + 0x24]
lea eax, [edx + ecx - 1]
xor edx, edx
div dword [ebp - 0xac]
xor edx, edx
mov dword [ebp - 0x44], eax
mov eax, ecx
div dword [ebp - 0xac]
cmp eax, dword [ebp - 0x44]
ja 0x513a2a
mov edx, edi
mov dword [ebp + 8], edi
and dword [ebp + 8], 0x40000000
mov dword [ebp + 0x10], edi
and edx, 0x20000000
and dword [ebp + 0x10], 0x80000000
mov ecx, dword [ebp + 0x18]
cmp edx, ebx
je 0x513a11
or byte [eax + ecx], 1
cmp dword [ebp + 8], ebx
je 0x513a1a
or byte [eax + ecx], 2
cmp dword [ebp + 0x10], ebx
je 0x513a24
add ecx, eax
or byte [ecx], 4
inc eax
cmp eax, dword [ebp - 0x44]
jbe 0x513a06
inc dword [ebp + 0xc]
mov eax, dword [ebp - 0x88]
mov cx, word [ebp + 0xc]
cmp cx, word [eax + 6]
jbe 0x513990
mov dword [ebp + 8], esi
xor edi, edi
mov eax, dword [ebp + 0x18]
push 2
pop ecx
movzx eax, byte [edi + eax]
sub eax, ecx
je 0x513a77
dec eax
je 0x513a6e
sub eax, 3
je 0x513a65
mov dword [ebp - 4], 0x40
jmp 0x513a94
mov dword [ebp - 4], 4
jmp 0x513a7a
mov dword [ebp - 4], 0x20
jmp 0x513a7a
mov dword [ebp - 4], ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 0xac]
push dword [ebp + 8]
call dword [ebp - 0xbc]
test eax, eax
je 0x513ac6
mov eax, dword [ebp - 0xac]
add dword [ebp + 8], eax
inc edi
cmp edi, dword [ebp - 0x8c]
jbe 0x513a46
mov eax, dword [ebp - 0x88]
mov edi, dword [eax + 0x28]
add edi, esi
call fcn.005132d7
jae 0x513aa6
aaa
inc esi
push dword [ebp + 0x14]
push 1
push esi
call edi
mov eax, esi
jmp 0x513ad2
push 0x8000
push ebx
push esi
call dword [ebp - 8]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret