Function at 0x497b60
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
push ebx
push esi
push edi
push 0x28
mov ebx, ecx
call fcn.004b7459
mov dl, byte [esp + 0x18]
mov esi, eax
mov edi, dword [esp + 0x1c]
add esp, 4
mov dword [esp + 0xc], esi
mov dword [esi + 4], 1
mov dword [esi], vtable.Struct.0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov word [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov al, byte [ebx + 0x15]
mov byte [esi + 0x15], al
mov eax, dword [ebx + 0x18]
mov dword [esi + 0x18], eax
test dl, dl
je 0x497c19
test edi, edi
jne 0x497c14
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [esi + 0x20], eax
test eax, eax
je 0x497c0b
push dword [esi + 0x18]
mov byte [esi + 0x14], 1
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 0x24], eax
test eax, eax
je 0x497c0b
push dword [ebx + 0x18]
push dword [ebx + 0x24]
push eax
call sub.VCRUNTIME140.dll_memmove
mov dl, byte [esp + 0x20]
add esp, 0xc
jmp 0x497c1f
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret 8
mov dword [esi + 0x20], edi
jmp 0x497c1f
mov eax, dword [ebx + 0x20]
mov dword [esi + 0x20], eax
cmp dword [ebx + 0xc], 0
push ebp
mov dword [esp + 0x10], 0
jle 0x497d30
xor ebp, ebp
mov edi, dword [esi + 0x10]
cmp dword [esi + 0xc], edi
jne 0x497c70
test edi, edi
je 0x497c44
add edi, edi
jmp 0x497c49
mov edi, 4
lea eax, [edi*8]
sub eax, edi
shl eax, 2
push eax
push dword [esi + 8]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
je 0x497d5b
mov dword [esi + 8], eax
mov dword [esi + 0x10], edi
mov eax, dword [ebx + 8]
push dword [eax + ebp + 0x18]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
mov edx, eax
add esp, 4
test edx, edx
je 0x497d5b
mov ecx, dword [ebx + 8]
inc dword [esi + 0xc]
add ecx, ebp
mov edi, dword [esi + 8]
add edi, ebp
mov eax, dword [ecx + 8]
mov dword [edi + 0x18], edx
mov dword [edi + 8], eax
mov eax, dword [ecx + 0x10]
mov dl, byte [esp + 0x18]
mov dword [edi + 0x10], eax
movzx eax, word [ecx + 4]
mov word [edi + 4], ax
mov eax, dword [ecx + 0xc]
mov dword [edi + 0xc], eax
movzx eax, byte [ecx + 1]
mov byte [edi + 1], al
movzx eax, byte [ecx]
mov byte [edi], al
movzx eax, byte [ecx + 2]
mov byte [edi + 2], al
movzx eax, byte [ecx + 3]
mov byte [edi + 3], al
movzx eax, word [ecx + 6]
mov word [edi + 6], ax
mov ecx, dword [ecx + 0x14]
test ecx, ecx
jne 0x497ce6
mov dword [edi + 0x14], ecx
jmp 0x497d17
test dl, dl
je 0x497d06
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x497cf5
mov eax, dword [esi + 0x20]
push eax
push 1
call fcn.00497b60
mov dword [edi + 0x14], eax
test eax, eax
je 0x497d5b
jmp 0x497d13
mov dword [edi + 0x14], ecx
test ecx, ecx
je 0x497d17
mov eax, dword [ecx]
push ecx
call dword [eax + 4]
mov dl, byte [esp + 0x18]
mov eax, dword [esp + 0x10]
add ebp, 0x1c
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [ebx + 0xc]
jl 0x497c34
mov edi, dword [esp + 0x1c]
test dl, dl
je 0x497d6b
test edi, edi
jne 0x497d6b
cmp dword [esi + 0xc], 1
jg 0x497d49
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x18]
cmp word [eax], di
je 0x497d6b
push 0
push 0
mov ecx, esi
call fcn.00497b60
mov dword [esi + 0x1c], eax
test eax, eax
jne 0x497d72
mov eax, dword [esi]
push esi
call dword [eax + 8]
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret 8
mov dword [esi + 0x1c], 0
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
pop ecx
ret 8