Function at 0x407fd0
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x5c
mov dword [esp + 0xc], 0
push ebx
push esi
mov ebx, dword [esp + 0x68]
push edi
push ebp
mov ecx, dword [0x444f30]
mov eax, dword [ebx + 0x18]
push eax
push ecx
call fcn.00410f00
lea ecx, [esp + 0x28]
add esp, 8
mov edx, dword [0x444f30]
push 8
push ecx
push edx
call fcn.00410e40
add esp, 0xc
test eax, eax
jne 0x40824f
lea eax, [ebx + 0x14]
lea ecx, [esp + 0x20]
push eax
mov edx, dword [0x444f30]
push ecx
push edx
call fcn.00410fa0
add esp, 0xc
test eax, eax
jne 0x40824f
call sub.CNCS232.dll_Ordinal_149
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x10], eax
mov ax, word [ebx + 2]
cmp ax, 0x20
jb 0x40819e
movzx eax, ax
push eax
xor edi, edi
call fcn.00411a50
mov dword [esp + 0x20], eax
add esp, 4
mov edx, dword [0x444fd4]
mov eax, dword [esp + 0x10]
mov di, word [eax + 0x24]
add edi, eax
xor eax, eax
mov ax, word [ebx + 2]
shl eax, 7
mov cx, word [edi + 6]
cmp word [eax + edx - 0xf92], cx
jle 0x40816d
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x48]
test eax, eax
je 0x40816d
push edi
push 0x4464b8
call eax
mov ebp, eax
test ebp, ebp
je 0x40816d
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalLock]
movsx edx, word [eax]
movsx ecx, word [edi]
mov dword [esp + 0x18], eax
cmp ecx, edx
jae 0x40814d
lea eax, [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x14], 0
movsx ecx, word [edx]
mov edx, dword [esp + 0x10]
push eax
movsx eax, word [edi]
sub ecx, eax
add ecx, dword [edx]
push ecx
call fcn.0040fdd0
add esp, 8
test eax, eax
je 0x40815f
mov eax, dword [esp + 0x10]
xor edx, edx
mov dx, word [eax + 0x24]
mov edi, dword [esp + 0x14]
mov esi, eax
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
xor edi, edi
mov esi, eax
movsx edx, word [eax]
mov di, word [ecx + 0x24]
mov ecx, edx
shr ecx, 2
add edi, dword [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebx + 0x14]
push eax
call fcn.0040fe50
mov eax, dword [esp + 0x18]
add esp, 4
mov dword [ebx + 0x14], eax
mov dword [esp + 0x10], eax
jmp 0x40815f
mov esi, dword [esp + 0x18]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea eax, [esp + 0x28]
push 0x44
push 0
push eax
call fcn.0040fed0
mov eax, dword [esp + 0x1c]
add esp, 0xc
xor ecx, ecx
push 1
mov cx, word [eax + 0x24]
mov ebp, dword [esp + 0x20]
add ecx, eax
lea eax, [esp + 0x2c]
push ecx
push eax
push 0x4464b8
call dword [ebp + 0x14]
mov ax, word [ebx + 2]
cmp ax, 0x20
jb 0x4081ca
mov eax, dword [esp + 0x10]
push fcn.004106c0
xor ecx, ecx
mov cx, word [eax + 0x24]
add ecx, eax
mov eax, dword [esp + 0x20]
push ecx
push 0
push 0x4464b8
call dword [eax + 0x20]
jmp 0x40823e
cmp ax, 9
jne 0x40823e
mov esi, 1
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov cx, word [eax + 0xc]
lea ebp, [ecx + eax + 0x10]
mov ecx, 0xffffffff
mov edi, ebp
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x104
jae 0x408232
xor esi, esi
lea eax, [esp + 0x10]
mov ecx, dword [esp + 0x10]
push eax
xor eax, eax
mov ax, word [ecx + 0xc]
add eax, 0x114
push eax
call fcn.0040fe10
add esp, 8
test eax, eax
je 0x408232
mov esi, 1
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov dword [ebx + 0x14], eax
mov cx, word [eax + 0xc]
lea ebp, [ecx + eax + 0x10]
test esi, esi
je 0x40823e
push ebp
push 0
call fcn.004106c0
mov eax, dword [ebx + 0x1c]
and eax, 0xfffffff9
mov dword [ebx + 0x1c], eax
or eax, 1
mov dword [ebx + 0x1c], eax
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x5c
ret