Function at 0x4010c0
Capabilities:
Inspect section memory permissions

Disassembly:
sub esp, 0x28
push ebx
push ebp
push edi
mov edi, eax
mov eax, dword [esp + 0x38]
mov ecx, dword [edi + 0x28]
mov edx, dword [eax + 0x10]
xor ebx, ebx
push edi
push eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x30], edx
mov byte [esp + 0x17], bl
mov dword [esp + 0x2c], ebx
call fcn.00403f30
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x4014f5
movzx ecx, word [ebp]
lea eax, [ecx*8]
sub eax, ecx
add eax, 0x584e40
mov dword [esp + 0x20], eax
movzx eax, byte [eax]
mov ebx, dword [eax*4 + 0x57fac0]
movzx eax, word [ebp + 2]
mov ecx, eax
and eax, 0x7fff
and ecx, 0x8000
mov word [ebp + 2], ax
cmp dword [edi + 0x18], 1
mov dword [esp + 0x30], ecx
jne 0x401163
mov eax, dword [edi]
test eax, 0x2000
je 0x401163
cmp dword [edi + 0x20], 0
jne 0x401163
test byte [esp + 0x1c], 8
je 0x401163
and eax, 0xffffdfff
push 3
push edi
mov dword [edi], eax
call fcn.00403690
add esp, 8
mov eax, dword [esp + 0x38]
cmp dword [eax + 0x18], 2
jne 0x40117f
test ebx, 0x800000
jne 0x4014f5
cmp dword [eax + 0x18], 2
je 0x40118f
test ebx, 0x8000000
jne 0x4014f5
mov eax, dword [esp + 0x38]
test bl, 1
je 0x4011dd
mov edx, ebx
not edx
test edx, 0x40000000
je 0x4011b0
inc dword [eax + 0x10]
dec dword [eax + 0x14]
js 0x4014f5
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 0x10]
movzx eax, byte [eax]
mov dword [esp + 0x10], eax
test ebx, 0x10000000
je 0x4011ca
test al, 0x38
jne 0x4014f5
test ebx, 0x100000
je 0x4011dd
cmp eax, 0xc0
jb 0x4014f5
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x1c]
inc dword [eax + 0x10]
mov ecx, dword [edi]
mov eax, dword [eax + 0x18]
push edx
mov edx, ebx
call fcn.00401080
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + 0x18]
add esp, 4
mov dword [esp + 0x14], eax
test ecx, 0x4000
je 0x40121c
mov ecx, eax
mov edx, dword [ecx*4 + 0x57f030]
mov dword [esp + 0x14], edx
push 0x40
push 0
push esi
call fcn.004d7120
mov eax, dword [esp + 0x2c]
mov byte [esi + 0x34], 0xff
mov al, byte [eax + 2]
add esp, 0xc
test al, al
je 0x401320
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x44]
push edi
push edx
push 0
movzx eax, al
push eax
push ebx
push ebp
push esi
push ecx
call fcn.004022d0
add esp, 0x2c
test eax, eax
je 0x4014f5
mov edx, dword [esp + 0x20]
mov al, byte [edx + 1]
test al, al
je 0x401320
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push 0
push ecx
mov ecx, dword [esp + 0x18]
push edx
push edi
push ecx
push 1
movzx edx, al
mov eax, dword [esp + 0x50]
push edx
push ebx
push ebp
push esi
push eax
call fcn.004022d0
add esp, 0x2c
test eax, eax
je 0x4014f5
test ebx, 0x20000
je 0x401320
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
push 0
push ecx
movzx ecx, byte [ebp + 5]
push edx
mov edx, dword [esp + 0x44]
push edi
push eax
push 2
push ecx
push ebx
push ebp
push esi
push edx
call fcn.004022d0
add esp, 0x2c
test eax, eax
je 0x4014f5
test ebx, 0x40000
je 0x401320
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
push 0
push eax
movzx eax, byte [ebp + 6]
push ecx
mov ecx, dword [esp + 0x44]
push edi
push edx
push 3
push eax
push ebx
push ebp
push esi
push ecx
call fcn.004022d0
add esp, 0x2c
test eax, eax
je 0x4014f5
test ebx, 0x200000
je 0x40135f
mov edx, dword [esp + 0x38]
push edx
call fcn.00404400
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4014f5
movzx ecx, word [ebp]
lea eax, [ecx*8]
sub eax, ecx
add eax, 0x584e40
mov dword [esp + 0x20], eax
movzx eax, byte [eax]
mov ebx, dword [eax*4 + 0x57fac0]
mov eax, ebx
and eax, 0x400000
mov dword [esp + 0x2c], eax
je 0x40139e
mov eax, dword [esp + 0x38]
dec dword [eax + 0x14]
js 0x4014f5
mov ecx, eax
mov eax, dword [ecx + 0x10]
mov dl, byte [eax]
inc eax
mov byte [esp + 0xf], dl
mov dword [ecx + 0x10], eax
test ebx, 0x20000000
je 0x401395
cmp dl, 0x20
jmp 0x401398
cmp dl, 8
jae 0x4014f5
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx + 0x10]
sub edx, dword [edi + 8]
cmp edx, 0xf
jg 0x4014f5
mov ecx, 1
cmp dword [esp + 0x24], ecx
jne 0x4013cb
test bl, 0x10
je 0x4013cb
or dword [edi + 4], 0x10
or word [esi + 0x18], cx
jmp 0x4013f3
test bl, 0x20
je 0x4013e0
test byte [edi], 0x20
je 0x4013e0
or dword [edi + 4], 0x20
or word [esi + 0x18], 2
jmp 0x4013f3
test bl, 0x40
je 0x4013f3
test byte [edi], 0x40
je 0x4013f3
or dword [edi + 4], 0x40
or word [esi + 0x18], 4
mov eax, ebx
and eax, 0x14000
cmp eax, 0x14000
jne 0x401437
mov eax, dword [esp + 0x14]
or dword [edi + 4], 0x4000
test eax, eax
jne 0x40141d
mov cx, word [ebp + 2]
mov word [esi + 0x20], cx
jmp 0x40156f
cmp eax, ecx
jne 0x40142e
mov dx, word [ebp + 8]
mov word [esi + 0x20], dx
jmp 0x40156f
mov ax, word [ebp + 0xa]
jmp 0x40156b
mov edx, ebx
and edx, 0xc000
cmp edx, 0xc000
jne 0x40145b
mov ax, word [ebp + 2]
mov word [esi + 0x20], ax
or dword [edi + 4], 0x4000
jmp 0x40156f
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x401487
test ebx, 0x10000
je 0x40147a
test ebx, 0x1000008
jne 0x40147a
or dword [edi + 4], 0x2000
mov cx, word [ebp + 2]
mov word [esi + 0x20], cx
jmp 0x40156f
cmp eax, ecx
jne 0x4014ce
mov edx, 0x100
or word [esi + 0x18], dx
test ebx, 0x10000
je 0x401567
or dword [edi + 4], 0x2000
test ebx, 0x80000
je 0x401421
cmp dword [esp + 0x10], 0xc0
jae 0x401567
mov cx, word [ebp + 8]
mov word [esi + 0x20], cx
jmp 0x40156f
mov ecx, 0x200
or word [esi + 0x18], cx
test ebx, 0x4010000
je 0x401567
test ebx, 0x80000
je 0x40153f
cmp dword [esp + 0x10], 0xc0
jb 0x40153f
push 0x40
push 0
push esi
call fcn.004d7120
mov edx, dword [esp + 0x34]
mov byte [esi + 0x34], 0xff
mov byte [esi + 0x32], 1
add esp, 0xc
mov dword [edi + 4], 0
cmp byte [edx], 0x9b
jne 0x401533
or byte [esi + 0x37], 8
pop edi
mov eax, 0x273a
pop ebp
mov word [esi + 0x20], ax
mov eax, 1
pop ebx
add esp, 0x28
ret
pop edi
pop ebp
mov eax, 3
pop ebx
add esp, 0x28
ret
test ebx, 0x4000000
je 0x401421
test byte [esp + 0x1c], 8
je 0x401421
or dword [edi + 4], 0x2000000
mov cx, word [ebp + 0xa]
mov word [esi + 0x20], cx
jmp 0x40156f
mov ax, word [ebp + 2]
mov word [esi + 0x20], ax
test ebx, 0x8000
je 0x401586
test dword [edi], 0x2000
je 0x401586
or dword [edi + 4], 0x2000
mov ecx, ebx
and ecx, 0x20000000
je 0x4015b1
mov al, byte [ebp + 4]
test al, 4
je 0x40159e
test byte [esp + 0x1c], 8
jne 0x4015a9
test al, 8
je 0x4015b1
test byte [esp + 0x1c], 0x10
je 0x4015b1
mov dx, word [ebp + 8]
mov word [esi + 0x20], dx
cmp dword [esp + 0x2c], 0
je 0x4015e8
test ecx, ecx
je 0x4015d3
movzx eax, byte [esp + 0xf]
mov cx, word [eax*2 + 0x585b20]
add cx, word [ebp + 2]
mov word [esi + 0x20], cx
jmp 0x4015e8
movzx edx, byte [esp + 0xf]
mov ax, word [edx*2 + 0x57fc64]
add ax, word [ebp + 2]
mov word [esi + 0x20], ax
mov ecx, dword [esp + 0x14]
and ecx, 3
shl ecx, 0xa
or word [esi + 0x18], cx
movzx eax, word [esi + 0x18]
test ebx, ebx
jns 0x401605
or eax, 0x40
mov word [esi + 0x18], ax
push edi
call fcn.00403720
mov dx, word [esp + 0x34]
or word [esi + 0x18], dx
mov ecx, dword [esp + 0x24]
mov word [esi + 0x1a], ax
mov al, byte [ecx + 3]
add esp, 4
cmp byte [esi + 0x33], 0
mov byte [esi + 0x37], al
jne 0x40162f
mov byte [esi + 0x33], 0xff
mov al, byte [esi + 0x34]
cmp al, 0xff
je 0x401643
movzx edx, al
mov eax, dword [edx*4 + 0x57f858]
or dword [esi + 0x1c], eax
mov al, byte [ecx + 4]
mov dl, al
and dl, 2
movzx edx, dl
add dx, dx
mov bl, al
and bl, 8
movzx edi, bl
or dx, di
add dx, dx
mov bl, al
and bl, 0x20
movzx edi, bl
or dx, di
shl dx, 6
and al, 0xd5
movzx eax, al
or dx, ax
mov word [esi + 0x38], dx
mov al, byte [ecx + 5]
mov dl, al
and dl, 2
movzx edx, dl
add dx, dx
mov bl, al
and bl, 8
movzx edi, bl
or dx, di
mov bl, al
add dx, dx
and bl, 0x20
and al, 0xd5
movzx edi, bl
or dx, di
shl dx, 6
movzx eax, al
or dx, ax
mov word [esi + 0x3a], dx
mov al, byte [ecx + 6]
mov cl, al
and cl, 2
movzx edx, cl
mov cl, al
and cl, 8
add dx, dx
movzx ecx, cl
or dx, cx
mov cl, al
and cl, 0x20
add dx, dx
movzx ecx, cl
or dx, cx
mov ecx, dword [esp + 0x38]
and al, 0xd5
movzx eax, al
shl dx, 6
or dx, ax
mov word [esi + 0x3c], dx
mov dl, byte [ecx + 0x10]
sub dl, byte [esp + 0x28]
pop edi
pop ebp
mov byte [esi + 0x32], dl
mov eax, 1
pop ebx
add esp, 0x28
ret