Function at 0x401c70
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x3c
push ebp
mov ebp, dword [esp + 0x44]
test ebp, ebp
push esi
push edi
mov esi, eax
mov edi, ecx
jne 0x401c8d
pop edi
pop esi
mov ax, 1
pop ebp
add esp, 0x3c
ret
cmp dword [esp + 0x50], 0
jne 0x401c9f
pop edi
pop esi
mov ax, 2
pop ebp
add esp, 0x3c
ret
cmp dword [esp + 0x54], 0
jne 0x401cb1
pop edi
pop esi
mov ax, 3
pop ebp
add esp, 0x3c
ret
test ebx, ebx
jne 0x401cc0
pop edi
pop esi
mov ax, 4
pop ebp
add esp, 0x3c
ret
test edi, edi
jne 0x401ccf
pop edi
pop esi
mov ax, 5
pop ebp
add esp, 0x3c
ret
test esi, esi
jne 0x401cde
pop edi
pop esi
mov ax, 6
pop ebp
add esp, 0x3c
ret
push esi
call fcn.004049a0
movzx eax, word [ebx]
add esp, 4
test ax, ax
jl 0x401d9c
mov cx, word [ebx + 0x1e]
mov edx, dword [edi + 0x1c]
not cx
and cx, word [edi + 0x18]
mov dword [esp + 0x2c], edx
or cx, word [ebx + 0x1c]
mov edx, dword [edi + 0x24]
mov word [esp + 0x28], cx
mov ecx, dword [edi + 0x20]
mov word [esp + 0x44], ax
movzx eax, word [ebp + 6]
mov dword [esp + 0x30], ecx
mov ecx, dword [edi + 0x28]
mov dword [esp + 0x34], edx
mov edx, dword [edi + 0x2c]
mov dword [esp + 0x38], ecx
mov ecx, dword [edi + 0x30]
mov dword [esp + 0x3c], edx
mov edx, dword [edi + 0x14]
movzx edi, ax
and eax, 0xfff7
or eax, 4
mov word [ebp + 6], ax
push esi
lea eax, [esp + 0x14]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x54]
push eax
push ecx
push ebp
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], edx
call fcn.0040a290
mov word [ebp + 6], di
mov eax, 0xa
add dword [esi + 8], eax
add esp, 0x10
add dword [esi + 0xc], eax
mov edx, dword [esi]
mov dword [ebx + 0xc], edx
mov eax, dword [esi + 4]
mov dword [ebx + 0x10], eax
mov ecx, dword [esi + 8]
mov dword [ebx + 0x14], ecx
mov edx, dword [esi + 0xc]
mov dword [ebx + 0x18], edx
pop edi
pop esi
xor ax, ax
pop ebp
add esp, 0x3c
ret
movzx eax, word [ebx + 4]
cmp ax, 0x7fff
mov ebp, dword [esp + 0x54]
je 0x401e02
lea ecx, [esp + 0x4c]
push ecx
push eax
push ebp
call fcn.00401c10
movzx eax, word [ebx + 8]
lea edx, [esp + 0x18]
push edx
push eax
push ebp
call fcn.00401c10
mov esi, dword [esp + 0x64]
add esp, 0x18
test esi, esi
je 0x401e66
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x401e66
mov eax, dword [ecx + 0x18]
mov edi, dword [esi + 0x10]
mov edx, dword [esi + 0x18]
sub eax, dword [ecx + 0x10]
sub edx, edi
cmp edx, eax
jle 0x401df5
mov eax, edx
add edi, eax
mov dword [esi + 0x18], edi
mov edx, dword [ecx + 0x10]
add edx, eax
mov dword [ecx + 0x18], edx
movzx eax, word [ebx + 6]
cmp ax, 0x7fff
je 0x401d92
lea ecx, [esp + 0x4c]
push ecx
push eax
push ebp
call fcn.00401c10
movzx eax, word [ebx + 0xa]
lea edx, [esp + 0x18]
push edx
push eax
push ebp
call fcn.00401c10
mov esi, dword [esp + 0x64]
add esp, 0x18
test esi, esi
je 0x401e71
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x401e71
mov eax, dword [ecx + 0x14]
mov edi, dword [esi + 0xc]
mov edx, dword [esi + 0x14]
sub eax, dword [ecx + 0xc]
sub edx, edi
cmp edx, eax
jle 0x401e4f
mov eax, edx
add edi, eax
mov dword [esi + 0x14], edi
mov edx, dword [ecx + 0xc]
pop edi
add edx, eax
pop esi
mov dword [ecx + 0x14], edx
xor ax, ax
pop ebp
add esp, 0x3c
ret
pop edi
pop esi
mov ax, 7
pop ebp
add esp, 0x3c
ret
pop edi
pop esi
mov ax, 8
pop ebp
add esp, 0x3c
ret