Function at 0x10017e9f
Capabilities:
Enumerate pe sections
Inspect section memory permissions

Disassembly:
sub esp, 0x18
mov edx, dword [ebx + 8]
push ebp
mov ebp, dword [esp + 0x20]
mov ecx, dword [ebp + 0x28]
push esi
xor eax, eax
push ebp
push ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], edx
mov byte [esp + 0x2c], al
mov dword [esp + 0x20], eax
call fcn.1001acef
mov esi, eax
add esp, 8
test esi, esi
je 0x100180dd
cmp dword [ebp + 0x18], 1
jne 0x10017f08
mov eax, dword [ebp]
test eax, 0x2000
je 0x10017f08
cmp dword [ebp + 0x20], 0
jne 0x10017f08
test byte [esp + 0x14], 8
je 0x10017f08
and eax, 0xffffdfff
push 3
push ebp
mov dword [ebp], eax
call fcn.1001a54f
add esp, 8
mov eax, dword [ebx + 0x10]
cmp eax, 2
jne 0x10017f21
test dword [esi + 8], 0x800000
jne 0x100180dd
cmp eax, eax
je 0x10017f2e
test dword [esi + 8], 0x8000000
jne 0x100180dd
mov ecx, dword [esi + 8]
test cl, 1
je 0x10017f80
not ecx
test ecx, 0x40000000
je 0x10017f4e
add dword [ebx + 8], 1
add dword [ebx + 0xc], 0xffffffff
js 0x100180dd
mov ecx, dword [ebx + 8]
movzx edx, byte [ecx]
mov ecx, dword [esi + 8]
test ecx, 0x10000000
mov dword [esp + 0xc], edx
je 0x10017f6c
test dl, 0x38
jne 0x100180dd
test ecx, 0x100000
je 0x10017f80
cmp edx, 0xc0
jb 0x100180dd
mov edx, dword [esp + 0x14]
add dword [ebx + 8], 1
mov ecx, dword [ebp]
push edx
mov edx, dword [esi + 8]
call fcn.10017e5f
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x10]
add esp, 4
test ecx, 0x4000
mov dword [esp + 8], eax
je 0x10017fb5
mov eax, dword [eax*4 + 0x10024024]
mov dword [esp + 8], eax
push 0x38
push 0
push edi
call fcn.1001b48f
mov byte [edi + 9], 0xff
mov al, byte [esi + 3]
add esp, 0xc
test al, al
je 0x10018097
mov edx, dword [esp + 8]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
push ecx
push ebp
push edx
push 0
movzx eax, al
push eax
push esi
push edi
push ebx
call fcn.1001918f
add esp, 0x28
test eax, eax
je 0x100180dd
mov al, byte [esi + 2]
test al, al
je 0x10018097
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x10]
push 0
push ecx
mov ecx, dword [esp + 0x14]
push edx
push ebp
push ecx
push 1
movzx edx, al
push edx
push esi
push edi
push ebx
call fcn.1001918f
add esp, 0x28
test eax, eax
je 0x100180dd
test dword [esi + 8], 0x20000
je 0x10018097
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push 0
push eax
movzx eax, byte [esi + 0x10]
push ecx
push ebp
push edx
push 2
push eax
push esi
push edi
push ebx
call fcn.1001918f
add esp, 0x28
test eax, eax
je 0x100180dd
test dword [esi + 8], 0x40000
je 0x10018097
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
push 0
push ecx
movzx ecx, byte [esi + 0x11]
push edx
push ebp
push eax
push 3
push ecx
push esi
push edi
push ebx
call fcn.1001918f
add esp, 0x28
test eax, eax
je 0x100180dd
test dword [esi + 8], 0x200000
je 0x100180af
push ebx
call fcn.1001afef
mov esi, eax
add esp, 4
test esi, esi
je 0x100180dd
test dword [esi + 8], 0x400000
je 0x100180d2
add dword [ebx + 0xc], 0xffffffff
js 0x100180dd
mov eax, dword [ebx + 8]
mov cl, byte [eax]
add eax, 1
cmp cl, 8
mov byte [esp + 0x24], cl
mov dword [ebx + 8], eax
jae 0x100180dd
mov edx, dword [ebx + 8]
sub edx, dword [ebp + 8]
cmp edx, 0xf
jle 0x10018122
push 0x38
push 0
push edi
call fcn.1001b48f
mov eax, dword [esp + 0x28]
mov byte [edi + 9], 0xff
mov byte [edi + 4], 1
add esp, 0xc
mov dword [ebp + 4], 0
cmp byte [eax], 0x9b
jne 0x10018117
or byte [edi + 0x32], 8
pop esi
mov word [edi + 0xc], 0x3db
mov eax, 1
pop ebp
add esp, 0x18
ret
pop esi
mov eax, 3
pop ebp
add esp, 0x18
ret
mov edx, 1
cmp dword [esp + 0x18], edx
jne 0x1001813d
test byte [esi + 8], 0x10
je 0x1001813d
or dword [ebp + 4], 0x10
or word [edi + 6], dx
jmp 0x10018168
mov eax, dword [esi + 8]
test al, 0x20
je 0x10018155
test byte [ebp], 0x20
je 0x10018155
or dword [ebp + 4], 0x20
or word [edi + 6], 2
jmp 0x10018168
test al, 0x40
je 0x10018168
test byte [ebp], 0x40
je 0x10018168
or dword [ebp + 4], 0x40
or word [edi + 6], 4
mov eax, dword [esi + 8]
mov ecx, eax
and ecx, 0x14000
cmp ecx, 0x14000
jne 0x100181ac
mov eax, dword [esp + 8]
or dword [ebp + 4], 0x4000
test eax, eax
je 0x10018288
cmp eax, edx
jne 0x1001819f
mov ax, word [esi + 0x12]
mov word [edi + 0xc], ax
jmp 0x10018290
mov cx, word [esi + 0x14]
mov word [edi + 0xc], cx
jmp 0x10018290
mov ecx, eax
and ecx, 0xc000
cmp ecx, 0xc000
jne 0x100181d0
mov dx, word [esi + 4]
mov word [edi + 0xc], dx
or dword [ebp + 4], 0x4000
jmp 0x10018290
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x100181fa
test eax, 0x10000
je 0x100181ed
test eax, 0x1000008
jne 0x100181ed
or dword [ebp + 4], 0x2000
mov ax, word [esi + 4]
mov word [edi + 0xc], ax
jmp 0x10018290
cmp ecx, edx
jne 0x1001824f
or word [edi + 6], 0x100
test dword [esi + 8], 0x10000
je 0x10018288
or dword [ebp + 4], 0x2000
mov eax, dword [esi + 8]
test eax, 0x80000
je 0x10018238
cmp dword [esp + 0xc], 0xc0
jb 0x10018232
mov cx, word [esi + 4]
mov word [edi + 0xc], cx
jmp 0x10018290
mov dx, word [esi + 0x12]
jmp 0x1001828c
test eax, 0x400000
je 0x1001827e
movzx ax, byte [esp + 0x24]
add ax, word [esi + 4]
mov word [edi + 0xc], ax
jmp 0x10018290
or word [edi + 6], 0x200
mov eax, dword [esi + 8]
test eax, 0x4010000
je 0x10018288
test eax, 0x4000000
je 0x1001827e
test byte [esp + 0x14], 8
je 0x1001827e
or dword [ebp + 4], 0x2000000
mov ax, word [esi + 0x14]
mov word [edi + 0xc], ax
jmp 0x10018290
mov cx, word [esi + 0x12]
mov word [edi + 0xc], cx
jmp 0x10018290
mov dx, word [esi + 4]
mov word [edi + 0xc], dx
test dword [esi + 8], 0x8000
je 0x100182a9
test dword [ebp], 0x2000
je 0x100182a9
or dword [ebp + 4], 0x2000
test dword [esi + 8], 0x20000000
je 0x100182d3
mov eax, dword [esi + 0xc]
test al, 4
je 0x100182c0
test byte [esp + 0x14], 8
jne 0x100182cb
test al, 8
je 0x100182d3
test byte [esp + 0x14], 0x10
je 0x100182d3
mov ax, word [esi + 0x12]
mov word [edi + 0xc], ax
mov eax, dword [esp + 8]
and eax, 3
shl eax, 0xa
or word [edi + 6], ax
test dword [esi + 8], 0x80000000
movzx eax, word [edi + 6]
je 0x100182f5
or eax, 0x40
mov word [edi + 6], ax
push ebp
call fcn.1001a5df
mov word [edi + 0x30], ax
mov cl, byte [esi + 1]
add esp, 4
cmp byte [edi + 8], 0
mov byte [edi + 0x32], cl
jne 0x10018312
mov byte [edi + 8], 0xff
mov al, byte [edi + 9]
cmp al, 0xff
je 0x10018328
movzx edx, al
mov ax, word [edx*2 + 0x10024850]
or word [edi + 0x34], ax
mov cl, byte [ebx + 8]
sub cl, byte [esp + 0x1c]
pop esi
mov byte [edi + 4], cl
mov eax, 1
pop ebp
add esp, 0x18
ret