Function at 0x413610
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
xor ecx, ecx
xor edx, edx
push edi
push esi
push ebx
sub esp, 0x6c
mov ebp, dword [esp + 0x84]
mov dword [esp + 0x3e], 0
mov dword [esp + 0x42], 0
mov eax, dword [ebp]
mov dword [esp + 0x46], 0
lea esi, [ebp + 4]
mov word [esp + 0x4a], cx
mov ecx, esi
mov dword [esp + 0x3a], eax
lea eax, [ebp + 0x12]
mov dword [esp + 0x2c], eax
mov ebx, eax
lea esi, [esi]
movzx eax, word [ecx]
mov edi, edx
or edi, 1
test al, 1
cmovne edx, edi
shr ax, 1
mov edi, eax
or di, 0x8000
test dl, 2
cmovne eax, edi
add ecx, 2
add edx, edx
mov word [ecx - 2], ax
cmp ebx, ecx
jne 0x413658
mov eax, dword [esp + 0x80]
mov dword [esp + 0x18], esi
lea edi, [esp + 0x4c]
movzx ebx, word [eax + 6]
mov eax, ebx
mov dword [esp + 0x28], ebx
shl eax, 0x10
sub eax, ebx
mov dword [esp + 0x20], eax
lea eax, [ebp + 6]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x3e]
mov dword [esp + 0x14], eax
lea esi, [esi]
nop
movzx eax, word [ebp + 4]
movzx edx, word [ebp + 6]
shl eax, 0x10
add eax, edx
cmp dword [esp + 0x20], eax
jb 0x4137d0
xor edx, edx
div dword [esp + 0x28]
mov word [esp + 0x24], ax
movzx eax, ax
mov edx, dword [esp + 0x80]
mov ecx, edi
call sym.___m16m
mov eax, 2
movzx ebx, word [ebp + eax*2]
cmp word [edi + eax*2], bx
jne 0x4137e8
add eax, 1
cmp eax, 9
jne 0x4136f0
mov edx, 7
xor ecx, ecx
nop
movzx eax, word [ebp + edx*2 + 2]
sub eax, ecx
movzx ecx, word [edi + edx*2 + 2]
sub eax, ecx
mov ecx, eax
mov word [ebp + edx*2 + 2], ax
shr ecx, 0x10
and ecx, 1
sub edx, 1
jne 0x413710
mov esi, dword [esp + 0x14]
movzx eax, word [esp + 0x24]
mov word [esi], ax
mov eax, dword [esp + 0x1c]
add esi, 2
mov dword [esp + 8], 0xc
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call sym._memmove
xor eax, eax
mov dword [esp + 0x14], esi
mov word [ebp + 0x10], ax
cmp esi, edi
jne 0x4136b8
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
xor eax, eax
lea esi, [esi]
nop
add esi, 2
or ax, word [esi - 2]
cmp edx, esi
jne 0x413780
mov edx, dword [esp + 0x3a]
test ax, ax
mov dword [ebp], edx
mov edx, dword [esp + 0x3e]
mov dword [ebp + 4], edx
mov edx, dword [esp + 0x42]
mov dword [ebp + 8], edx
mov edx, dword [esp + 0x46]
mov dword [ebp + 0xc], edx
movzx edx, word [esp + 0x4a]
mov word [ebp + 0x10], dx
mov edx, 1
cmovne eax, edx
add esp, 0x6c
pop ebx
pop esi
movzx eax, ax
pop edi
pop ebp
ret
mov edx, 0xffffffff
mov eax, 0xffff
mov word [esp + 0x24], dx
jmp 0x4136dd
jbe 0x413707
movzx eax, word [esp + 0x24]
xor ecx, ecx
lea edx, [esp + 0x5c]
sub eax, 1
mov word [esp + 0x26], ax
mov eax, dword [esp + 0x80]
lea esi, [eax + 0x10]
mov ebx, esi
lea esi, [esi]
movzx eax, word [edx]
sub edx, 2
sub ebx, 2
sub eax, ecx
movzx ecx, word [ebx + 2]
sub eax, ecx
mov ecx, eax
mov word [edx + 2], ax
lea eax, [esp + 0x4e]
shr ecx, 0x10
and ecx, 1
cmp edx, eax
jne 0x413810
mov eax, 2
lea esi, [esi]
movzx ebx, word [ebp + eax*2]
cmp word [edi + eax*2], bx
jne 0x413868
add eax, 1
cmp eax, 9
jne 0x413840
movzx eax, word [esp + 0x26]
mov word [esp + 0x24], ax
jmp 0x413707
jbe 0x413853
sub word [esp + 0x24], 2
xor ecx, ecx
lea edx, [esp + 0x5c]
lea esi, [esi]
lea esi, [esi]
movzx eax, word [edx]
sub edx, 2
sub esi, 2
sub eax, ecx
movzx ecx, word [esi + 2]
sub eax, ecx
mov ecx, eax
mov word [edx + 2], ax
lea eax, [esp + 0x4e]
shr ecx, 0x10
and ecx, 1
cmp edx, eax
jne 0x413880
jmp 0x413707