Function at 0x504795
Capabilities:
Inspect section memory permissions

Disassembly:
push 0xd4
mov eax, 0x52baeb
call fcn.00452846
mov esi, ecx
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
and dword [ebp - 0x34], 0
push 1
push 3
lea ecx, [ebp - 0xe0]
mov dword [ebp - 0x38], edi
call fcn.00444e04
push 0
push ebx
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 4], 1
call fcn.004e452e
push eax
lea eax, [ebp - 0xd0]
push eax
mov byte [ebp - 4], 2
call fcn.0044e3bb
push 0
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.00444c55
test ebx, ebx
je 0x504b8f
push 0x418f88
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
xor eax, eax
push eax
push ebx
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x30], esp
push 8
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], eax
push 0x4193bc
mov byte [ecx], al
call fcn.004441b2
lea ecx, [esi + 0xf4]
call fcn.004e4237
sub esp, 0x30
mov ecx, esp
mov dword [ebp - 0x30], esp
push eax
call fcn.004e43d4
lea eax, [ebp - 0xd0]
push eax
call fcn.004e4413
test bl, 1
je 0x504884
push 0x4193c8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xfffffffe
je 0x504884
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test bl, 2
je 0x5048b0
push 0x4193dc
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xfffffffd
je 0x5048b0
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test bl, 4
je 0x5048dc
push 0x4193e8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xfffffffb
je 0x5048dc
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test bl, 8
je 0x504908
push 0x4193f8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xfffffff7
je 0x504908
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test bl, 0x10
je 0x504934
push 0x419404
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xffffffef
je 0x504934
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test bl, 0x20
je 0x504960
push 0x419414
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xffffffdf
je 0x504960
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test bl, 0x40
je 0x50498c
push 0x419428
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xffffffbf
je 0x50498c
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test bl, bl
jns 0x5049ba
push 0x419434
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xffffff7f
je 0x5049ba
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test ebx, 0x100
je 0x5049ec
push 0x419444
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xfffffeff
je 0x5049ec
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test ebx, 0x200
je 0x504a1e
push 0x41945c
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xfffffdff
je 0x504a1e
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
mov ecx, 0x80000000
mov eax, ebx
and eax, ecx
cmp eax, ecx
jne 0x504a55
push 0x419478
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0x7fffffff
je 0x504a55
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test ebx, 0x20000000
je 0x504a87
push 0x419488
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xdfffffff
je 0x504a87
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test ebx, 0x40000000
je 0x504ab9
push 0x419498
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xbfffffff
je 0x504ab9
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test ebx, 0x10000000
je 0x504aeb
push 0x4194a4
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xefffffff
je 0x504aeb
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test ebx, 0x8000000
je 0x504b1d
push 0x4194b0
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
and ebx, 0xf7ffffff
je 0x504b59
push 0x418fa8
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
test ebx, ebx
je 0x504b59
push 0
push ebx
lea eax, [ebp - 0x2c]
push eax
call fcn.004e452e
push eax
push 0x418fdc
lea eax, [ebp - 0xd0]
push eax
mov byte [ebp - 4], 3
call fcn.00448863
push eax
call fcn.0044e3bb
push 0
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.00444c55
lea ecx, [esi + 0xf4]
call fcn.004e3b5e
sub esp, 0x30
mov ecx, esp
mov dword [ebp - 0x30], esp
push eax
call fcn.004e43d4
lea eax, [ebp - 0xd0]
push eax
call fcn.004e4413
push 0x418ff0
lea eax, [ebp - 0xd0]
push eax
call fcn.00448863
push edi
lea ecx, [ebp - 0xe0]
call fcn.00444ead
lea ecx, [ebp - 0xe0]
mov dword [ebp - 0x34], 1
mov byte [ebp - 4], 0
call fcn.00444de3
mov eax, edi
call fcn.004528d8
ret 8