Function at 0x10039a30
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x48
push ebx
mov ebx, dword [esp + 0x58]
push ebp
push esi
push edi
mov edi, dword [esp + 0x60]
mov dl, byte [edi + 6]
mov ecx, dword [edi + 8]
test dl, dl
jns 0x10039a75
lea eax, [ecx - 1]
test ecx, eax
je 0x10039a75
mov eax, ecx
shr eax, 1
or ecx, eax
mov eax, ecx
shr eax, 2
or ecx, eax
mov eax, ecx
shr eax, 4
or ecx, eax
mov eax, ecx
shr eax, 8
or ecx, eax
mov ebp, ecx
shr ebp, 0x10
or ebp, ecx
inc ebp
jmp 0x10039a77
mov ebp, ecx
push dword [esp + 0x68]
lea eax, [esp + 0x3c]
mov dword [edi + 8], ebp
push eax
push dword [esp + 0x64]
and dl, 0x7f
mov byte [edi + 6], dl
call fcn.1003a260
add esp, 0xc
cmp ebx, ebp
jae 0x10039b88
mov al, byte [edi + 7]
mov byte [esp + 0x13], al
mov eax, dword [edi + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x14]
mov dword [esp + 0x20], eax
movzx eax, byte [esp + 0x3f]
mov byte [edi + 7], al
mov eax, dword [esp + 0x48]
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x4c]
mov dword [edi + 0x14], eax
mov eax, ebx
shl eax, 4
mov esi, eax
mov dword [edi + 8], ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x60], esi
nop word [eax + eax]
add esi, dword [edi + 0xc]
test byte [esi + 8], 0xf
je 0x10039b39
lea eax, [ebx + 1]
push 0
push eax
push edi
call fcn.100393e0
mov edx, eax
add esp, 0xc
cmp byte [edx + 8], 0x20
jne 0x10039b29
lea eax, [ebx + 1]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push esi
push eax
push edi
push dword [esp + 0x68]
mov byte [esp + 0x40], 3
call fcn.10039640
add esp, 0x10
jmp 0x10039b39
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov al, byte [esi + 8]
mov byte [edx + 8], al
mov esi, dword [esp + 0x60]
inc ebx
add esi, 0x10
mov dword [esp + 0x60], esi
cmp ebx, ebp
jb 0x10039ae0
mov ecx, dword [edi + 0x10]
mov bl, byte [esp + 0x13]
mov esi, dword [esp + 0x1c]
mov al, byte [edi + 7]
mov edx, dword [edi + 0x14]
mov dword [edi + 0x10], esi
mov esi, dword [esp + 0x20]
mov dword [esp + 0x14], ecx
mov byte [edi + 7], bl
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x24]
mov dword [edi + 8], ebp
mov dword [esp + 0x18], edx
mov dword [edi + 0x14], esi
mov byte [esp + 0x3f], al
mov dword [esp + 0x4c], edx
jmp 0x10039ba1
mov eax, dword [esp + 0x4c]
mov ecx, ebx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x14], eax
mov al, byte [esp + 0x3f]
shl ecx, 4
push ecx
mov esi, ebp
mov byte [esp + 0x64], al
shl esi, 4
push esi
push dword [edi + 0xc]
push dword [esp + 0x68]
call fcn.10041950
add esp, 0x10
mov dword [esp + 0x64], eax
test eax, eax
jne 0x10039bcb
test ebx, ebx
jne 0x10039c86
mov eax, dword [edi + 0x14]
mov cl, byte [edi + 7]
mov edx, dword [edi + 0x10]
mov dword [esp + 0x20], eax
mov al, byte [esp + 0x60]
mov byte [edi + 7], al
mov eax, dword [esp + 0x14]
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x18]
mov dword [edi + 0x14], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x24], edx
mov dword [edi + 0xc], eax
mov dword [edi + 8], ebx
cmp ebp, ebx
jae 0x10039c11
sub ebx, ebp
mov eax, dword [edi + 0xc]
lea esi, [esi + 0x10]
mov byte [esi + eax - 8], 0x10
sub ebx, 1
jne 0x10039c01
mov ebp, 1
shl ebp, cl
test ebp, ebp
jle 0x10039c5d
lea esi, [edx + 0x10]
mov ebx, ebp
test byte [esi - 8], 0xf
je 0x10039c51
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esp + 0x28], eax
mov al, byte [esi - 7]
mov byte [esp + 0x30], al
lea eax, [esi - 0x10]
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x30], ecx
push eax
push edi
push dword [esp + 0x68]
call fcn.10039cf0
add esp, 0x10
add esi, 0x18
sub ebx, 1
jne 0x10039c21
mov edx, dword [esp + 0x24]
cmp dword [esp + 0x20], 0
je 0x10039c7e
lea eax, [ebp*2]
add eax, ebp
shl eax, 3
push eax
push edx
push dword [esp + 0x64]
call fcn.10041840
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
mov ebx, dword [esp + 0x5c]
lea eax, [esp + 0x38]
push eax
push ebx
call fcn.10038ec0
add esp, 8
push 4
push ebx
call fcn.1002f9e0
int3