Function at 0x10d7cec
Capabilities:
Enumerate pe sections
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov ebx, edx
mov edi, eax
xor eax, eax
push ebp
push 0x10d8309
push dword fs:[eax]
mov dword fs:[eax], esp
cmp bl, 1
jne 0x10d7d6d
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 0x30]
mov eax, edi
call fcn.010d7784
mov esi, eax
cmp dword [edi + 0x44], 1
jne 0x10d7d6d
cmp esi, 1
jne 0x10d7d66
mov eax, dword [edi + 0x20]
mov eax, dword [eax + 0x2c]
mov edx, dword [edi + 0x20]
add eax, dword [edx + 0x1c]
lea edx, [esi + esi*4]
mov ecx, dword [edi + 0x24]
cmp eax, dword [ecx + edx*8 + 0xc]
jbe 0x10d7d66
inc esi
mov eax, dword [edi + 0x20]
movzx eax, word [eax + 6]
cmp esi, eax
jge 0x10d7d6d
mov bl, 2
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
mov eax, dword [edx + eax*8 + 0xc]
mov edx, dword [edi + 0x20]
mov dword [edx + 0x30], eax
jmp 0x10d7d6d
cmp esi, 2
jne 0x10d7d6d
mov bl, 2
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 0x78]
mov eax, edi
call fcn.010d7784
mov esi, eax
cmp dword [edi + 0x44], 1
jne 0x10d7dbf
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114270]
call fcn.010d7c70
lea edx, [esi + esi*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + edx*8 + 0x24]
or edx, 0x10000000
or edx, 0x40000000
or edx, 0x40
push edx
lea edx, [esi + esi*4]
pop ecx
mov dword [eax + edx*8 + 0x24], ecx
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 0x80]
mov eax, edi
call fcn.010d7784
mov esi, eax
cmp dword [edi + 0x44], 1
jne 0x10d7e14
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x111425c]
call fcn.010d7c70
lea edx, [esi + esi*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + edx*8 + 0x24]
or edx, 0x40000000
or edx, 0x80000000
or edx, 0x40
push edx
lea edx, [esi + esi*4]
pop ecx
mov dword [eax + edx*8 + 0x24], ecx
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 0x88]
mov eax, edi
call fcn.010d7784
mov esi, eax
cmp dword [edi + 0x44], 1
jne 0x10d7e69
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x111426c]
call fcn.010d7c70
lea edx, [esi + esi*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + edx*8 + 0x24]
or edx, 0x10000000
or edx, 0x40000000
or edx, 0x40
push edx
lea edx, [esi + esi*4]
pop ecx
mov dword [eax + edx*8 + 0x24], ecx
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 0xa0]
mov eax, edi
call fcn.010d7784
mov esi, eax
cmp dword [edi + 0x44], 1
jne 0x10d7ebe
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114268]
call fcn.010d7c70
lea edx, [esi + esi*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + edx*8 + 0x24]
or edx, 0x10000000
or edx, 0x40000000
or edx, 0x40
push edx
lea edx, [esi + esi*4]
pop ecx
mov dword [eax + edx*8 + 0x24], ecx
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 0xc0]
mov eax, edi
call fcn.010d7784
mov esi, eax
cmp dword [edi + 0x44], 1
jne 0x10d7fa7
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114264]
call fcn.010d7c70
lea edx, [esi + esi*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + edx*8 + 0x24]
or edx, 0x10000000
or edx, 0x40000000
or edx, 0x40
push edx
lea edx, [esi + esi*4]
pop ecx
mov dword [eax + edx*8 + 0x24], ecx
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
mov edx, dword [edx + eax*8 + 0x14]
mov eax, edi
call fcn.010d764c
mov eax, dword [eax]
sub eax, dword [edi + 0x18]
lea edx, [esi + esi*4]
mov ecx, dword [edi + 0x24]
cmp eax, dword [ecx + edx*8 - 0x1c]
jne 0x10d7f74
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8 - 0x28]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114260]
call fcn.010d7c70
lea edx, [esi + esi*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + edx*8 + 0x24]
or edx, 0x80000000
or edx, 0x40000000
push edx
lea edx, [esi + esi*4]
pop ecx
mov dword [eax + edx*8 - 4], ecx
cmp bl, 1
je 0x10d7f7e
cmp bl, 2
jne 0x10d7fa7
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
cmp dword [edx + eax*8 + 0x38], 0
jne 0x10d7fa7
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8 + 0x28]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114268]
call fcn.010d7c70
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 0x2c]
mov eax, edi
call fcn.010d7784
mov esi, eax
cmp dword [edi + 0x44], 1
jne 0x10d8047
cmp bl, 2
jne 0x10d8004
test esi, esi
jne 0x10d8004
mov eax, dword [edi + 0x24]
mov edx, dword [0x1114250]
call fcn.010d7c70
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
mov edx, dword [edx + eax*8 + 0x24]
or edx, 0x20000000
or edx, 0x80000000
or edx, 0x40000000
or edx, 0x20
push edx
mov edx, dword [edi + 0x24]
pop ecx
mov dword [edx + eax*8 + 0x24], ecx
mov esi, 1
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114250]
call fcn.010d7c70
lea edx, [esi + esi*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + edx*8 + 0x24]
or edx, 0x20000000
or edx, 0x80000000
or edx, 0x40000000
or edx, 0x20
push edx
lea edx, [esi + esi*4]
pop ecx
mov dword [eax + edx*8 + 0x24], ecx
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 0x30]
mov eax, edi
call fcn.010d7784
mov esi, eax
cmp dword [edi + 0x44], 1
jne 0x10d817c
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114254]
call fcn.010d7c70
lea edx, [esi + esi*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + edx*8 + 0x24]
or edx, 0x80000000
or edx, 0x40000000
or edx, 0x40
push edx
lea edx, [esi + esi*4]
pop ecx
mov dword [eax + edx*8 + 0x24], ecx
cmp bl, 1
je 0x10d80ab
cmp bl, 2
jne 0x10d817c
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8 + 0x28]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114258]
call fcn.010d7c70
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
mov dword [edx + eax*8 + 0x4c], 0xc0000000
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
mov edx, dword [edx + eax*8 + 0x3c]
mov eax, edi
call fcn.010d764c
push eax
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
mov edx, dword [edx + eax*8 + 0x3c]
mov eax, edi
call fcn.010d764c
lea edx, [esi + esi*4]
mov ecx, dword [edi + 0x24]
add eax, dword [ecx + edx*8 + 0x38]
pop edx
sub eax, edx
jl 0x10d811e
inc eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp byte [eax], 0
jne 0x10d811e
inc dword [ebp - 4]
dec dword [ebp - 0xc]
jne 0x10d810e
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
mov edx, dword [edx + eax*8 + 0x3c]
mov eax, edi
call fcn.010d764c
lea edx, [esi + esi*4]
mov ecx, dword [edi + 0x24]
add eax, dword [ecx + edx*8 + 0x38]
cmp eax, dword [ebp - 4]
jle 0x10d817c
push 0x34
push 0x10d8318
push 0x10d832c
call sub.user32.dll_GetForegroundWindow
push eax
call sub.user32.dll_MessageBoxW
cmp eax, 6
jne 0x10d817c
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
mov edx, dword [edx + eax*8 + 0x3c]
mov eax, edi
call fcn.010d764c
lea edx, [esi + esi*4]
mov ecx, dword [edi + 0x24]
mov edx, dword [ecx + edx*8 + 0x38]
xor ecx, ecx
call fcn.01004858
cmp bl, 1
je 0x10d818a
cmp bl, 2
jne 0x10d82af
mov eax, dword [edi + 0x20]
movzx eax, word [eax + 6]
dec eax
test eax, eax
jl 0x10d81c2
inc eax
mov dword [ebp - 0xc], eax
xor esi, esi
lea eax, [ebp - 0x10]
lea edx, [esi + esi*4]
mov ecx, dword [edi + 0x24]
lea edx, [ecx + edx*8]
call fcn.01006ce4
mov eax, dword [ebp - 0x10]
mov edx, 0x10d8384
call fcn.01007240
je 0x10d81c2
inc esi
dec dword [ebp - 0xc]
jne 0x10d819c
mov eax, dword [edi + 0x20]
movzx eax, word [eax + 6]
sub eax, 3
cmp esi, eax
jg 0x10d82ee
lea eax, [ebp - 0x14]
lea edx, [esi + esi*4]
mov ecx, dword [edi + 0x24]
lea edx, [ecx + edx*8 + 0x50]
call fcn.01006ce4
mov eax, dword [ebp - 0x14]
mov edx, 0x10d83a0
call fcn.01007240
jne 0x10d823b
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
cmp dword [edx + eax*8 + 0x38], 0
jne 0x10d823b
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
cmp dword [edx + eax*8 + 0x30], 0x1000
jne 0x10d823b
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
cmp byte [edx + eax*8 + 0x28], 0
jne 0x10d823b
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8 + 0x28]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114270]
call fcn.010d7c70
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
cmp byte [edx + eax*8 + 0x28], 0
jne 0x10d82af
lea eax, [ebp - 8]
push eax
lea ecx, [esi + 1]
mov edx, dword [edi + 0x18]
mov eax, edi
call fcn.010d6404
test al, al
je 0x10d82af
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8 + 0x28]
mov edx, 0x10d83b8
call fcn.010d7c70
lea edx, [esi + esi*4]
mov ecx, dword [edi + 0x24]
mov edx, dword [ecx + edx*8 + 0x34]
mov eax, dword [edi + 0x20]
mov dword [eax + 0xe0], edx
mov edx, dword [ebp - 8]
mov dword [eax + 0xe4], edx
lea edx, [esi + esi*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + edx*8 + 0x4c]
or edx, 0x80000000
or edx, 0x40000000
or edx, 0x40
push edx
lea edx, [esi + esi*4]
pop ecx
mov dword [eax + edx*8 + 0x4c], ecx
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 0xa8]
mov eax, edi
call fcn.010d7784
mov esi, eax
cmp dword [edi + 0x44], 1
jne 0x10d82ee
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
cmp byte [edx + eax*8], 0
jne 0x10d82ee
lea eax, [esi + esi*4]
mov edx, dword [edi + 0x24]
lea eax, [edx + eax*8]
movzx edx, bl
lea edx, [edx + edx*4]
mov edx, dword [edx*8 + 0x1114274]
call fcn.010d7c70
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x10d8310
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.01006b60
ret