Function at 0x100312e0
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x988
push edi
xor edi, edi
cmp dword [0x3084504], edi
mov dword [esp + 0x10], 0x3e8
je 0x100316d8
cmp dword [0x3084528], edi
je 0x100316d8
mov ecx, dword [0x308452c]
cmp ecx, edi
jne 0x10031331
push 0x1c
push 0x1f40
call fcn.100292b0
add esp, 8
cmp eax, edi
mov dword [0x308452c], eax
je 0x100316d8
mov ecx, eax
mov eax, dword [0x308433c]
cmp dword [eax], edi
push ebp
mov ebp, dword [eax + 8]
mov dword [esp + 8], edi
jbe 0x100316b2
push ebx
push esi
mov dword [esp + 0x24], edi
lea esp, [esp]
mov eax, dword [0x3084504]
cmp word [eax + edi*8 + 4], 0
je 0x10031694
mov esi, dword [eax + edi*8]
xor ebx, ebx
cmp word [esi], bx
mov dword [esp + 0x14], ebx
jl 0x100313b3
nop
cmp word [esi + 6], 0
je 0x100313a6
cmp word [esi + 4], 3
jl 0x100313a6
mov edx, dword [esi + 4]
mov eax, dword [esi]
mov dword [esp + ebx*8 + 0x38], eax
mov dword [esp + ebx*8 + 0x3c], edx
movsx edx, word [esp + ebx*8 + 0x3c]
mov eax, 0x55555556
imul edx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov word [esp + ebx*8 + 0x3c], ax
add ebx, 1
add esi, 8
cmp word [esi], 0
jge 0x10031370
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x24]
xor edx, edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x20], eax
mov eax, dword [0x308433c]
mov ebp, dword [eax + 8]
add ebp, dword [esp + 0x20]
add edx, edi
cmp edx, dword [eax]
jae 0x100315ec
mov edx, dword [0x3084504]
mov ebx, dword [edx + edi*8]
mov ax, word [ebx]
xor esi, esi
test ax, ax
mov dword [esp + 0x2c], esi
jl 0x100315e8
cmp word [ebx + 6], 0
movsx edi, ax
movsx eax, word [ebx + 4]
mov dword [esp + 0x18], eax
je 0x1003153f
push edi
push ebp
call fcn.1003c620
mov ecx, dword [esp + 0x20]
add esp, 8
cmp byte [ebp + 0x10], 2
jne 0x1003146b
movsx eax, word [ebx]
mov edx, dword [ebp + 4]
mov dword [esp + 0x28], eax
add eax, ecx
cmp edx, eax
mov dword [esp + 0x30], edx
jb 0x1003146b
mov eax, dword [ebp + 8]
lea edx, [ecx + ecx]
cmp eax, edx
jbe 0x1003146b
mov edx, dword [esp + 0x28]
sub edx, ecx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x30]
sub edx, eax
cmp edx, dword [esp + 0x28]
ja 0x1003146b
mov edi, dword [esp + 0x30]
push ebp
sub edi, ecx
mov dword [esp + 0x30], 1
call fcn.1003c520
mov ecx, dword [esp + 0x1c]
add esp, 4
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 4]
sub edx, eax
movsx eax, word [ebx + 2]
cmp edx, eax
jae 0x10031539
jmp 0x10031485
mov ecx, dword [esp + 0x18]
cmp dword [ebp + 0xc], 0
jne 0x10031539
cmp byte [ebp + 0x10], 1
je 0x1003151c
lea eax, [ecx + ecx]
cmp dword [ebp + 8], eax
jbe 0x1003151c
mov eax, dword [0x308452c]
mov word [eax + esi*8], di
mov dx, word [ebp + 4]
sub dx, word [ebp + 8]
mov dword [esp + 0x2c], 1
add ecx, edx
mov word [eax + esi*8 + 2], cx
mov dx, word [ebx + 2]
cmp cx, dx
jle 0x100314d3
mov word [eax + esi*8 + 2], dx
cmp di, word [eax + esi*8 + 2]
mov cx, word [ebx + 4]
mov word [eax + esi*8 + 4], cx
mov word [eax + esi*8 + 6], 1
jge 0x100314ed
add esi, 1
mov ecx, dword [esp + 0x1c]
cmp esi, ecx
jl 0x10031512
add ecx, 0x32
lea edx, [ecx*8]
push edx
push eax
mov dword [esp + 0x24], ecx
call fcn.10029480
add esp, 8
mov dword [0x308452c], eax
mov edi, dword [ebp + 4]
sub edi, dword [esp + 0x18]
add edi, 1
push ebp
call fcn.1003c520
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 4]
movsx edx, word [ebx + 2]
sub ecx, eax
add esp, 4
cmp ecx, edx
jb 0x10031481
mov ecx, dword [0x308452c]
mov word [ecx + esi*8], di
movzx eax, word [ebx + 2]
mov word [ecx + esi*8 + 2], ax
cmp word [ecx + esi*8 + 2], di
mov dx, word [ebx + 4]
mov word [ecx + esi*8 + 4], dx
movzx eax, word [ebx + 6]
mov word [ecx + esi*8 + 6], ax
jle 0x10031568
add esi, 1
mov eax, dword [esp + 0x1c]
cmp esi, eax
jl 0x1003158f
add eax, 0x32
lea edx, [eax*8]
push edx
push ecx
mov dword [esp + 0x24], eax
call fcn.10029480
add esp, 8
mov dword [0x308452c], eax
mov ecx, eax
mov ax, word [ebx + 8]
add ebx, 8
test ax, ax
jge 0x100313f2
cmp dword [esp + 0x2c], 0
je 0x100315e4
cmp esi, 0x1c2
mov word [ecx + esi*8], 0xffff
jle 0x100315c8
push esi
push 0x30801d8
call fcn.100364c0
mov ecx, dword [0x308452c]
add esp, 8
mov eax, dword [0x3084504]
push esi
push ecx
mov ecx, dword [esp + 0x18]
lea ebx, [eax + ecx*8]
call fcn.100310b0
mov ecx, dword [0x308452c]
add esp, 8
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x34]
add dword [esp + 0x20], 0x18
add edx, 1
cmp edx, 3
mov dword [esp + 0x34], edx
jb 0x100313c1
test ebx, ebx
je 0x10031694
mov edx, dword [0x3084504]
movsx ecx, word [edx + edi*8 + 4]
mov eax, dword [esp + 0x10]
mov esi, dword [edx + eax*8]
mov edx, dword [0x308452c]
add ecx, ecx
add ecx, ecx
add ecx, ecx
mov word [esp + ebx*8 + 0x38], 0xffff
mov ebx, ecx
shr ecx, 2
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [0x3084504]
movsx edi, word [edi + eax*8 + 4]
mov ecx, dword [esp + 0x14]
lea ecx, [ecx*8 + 8]
mov ebx, ecx
shr ecx, 2
lea edi, [edx + edi*8]
lea esi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x3084504]
lea eax, [ecx + eax*8]
movsx ecx, word [eax + 4]
add ecx, dword [esp + 0x14]
mov ebx, eax
push ecx
push edx
call fcn.100310b0
mov ecx, dword [0x308452c]
mov edi, dword [esp + 0x18]
add esp, 8
mov eax, dword [0x308433c]
add dword [esp + 0x24], 0x18
add edi, 1
add ebp, 0x18
cmp edi, dword [eax]
mov dword [esp + 0x10], edi
jb 0x10031350
pop esi
pop ebx
push eax
call fcn.1003c5f0
mov eax, dword [0x308452c]
add esp, 4
test eax, eax
pop ebp
je 0x100316d8
push eax
call fcn.10029420
add esp, 4
mov dword [0x308452c], 0
pop edi
add esp, 0x988
ret