Function at 0x406c50
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x318
mov al, byte [0x413b7c]
push ebx
push ebp
push esi
mov esi, edx
push edi
mov edx, ecx
mov byte [esp + 0x9c], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x9d]
xor ebp, ebp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp edx, ebp
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], edx
stosb byte es:[edi], al
je 0x406e8e
mov dword [0x413b18], 0x42
mov ecx, dword [esi + 0x10]
mov ebx, 1
push 0x413b18
mov dword [0x413b1c], ecx
mov dword [0x413b20], ebp
mov dword [0x413b24], ebp
mov dword [0x413b2c], 0x8010c
mov word [0x413b38], bx
call sub.comdlg32.dll_PrintDlgA
test eax, eax
jne 0x406cf3
mov edx, dword [esi + 0x10]
push 0x30
push 0x413b7c
push 0x410114
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x318
ret
call fcn.00409030
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x10], edi
jne 0x406d23
mov eax, dword [esi + 0x10]
push 0x10
push 0x413b7c
push 0x4100fc
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x318
ret
push ebp
push 0x408ec0
push ebp
push 9
push edi
call dword [sym.imp.GDI32.dll_Escape]
lea ecx, [esp + 0x34]
mov dword [esp + 0x34], 0x14
push ecx
push edi
mov dword [esp + 0x40], 0x41007c
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
call dword [sym.imp.GDI32.dll_StartDocA]
test eax, eax
jge 0x406d83
mov edx, dword [esi + 0x10]
push 0x10
push ebp
push 0x4100e0
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x318
ret
mov dword [0x413b5c], ebp
mov eax, dword [esi + 0x10]
push ebp
push 0x408f50
push eax
push 0x4100d0
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [0x413aec], eax
push ebx
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x413b5c]
mov dword [esp + 0x18], ebx
mov ebx, dword [sym.imp.USER32.dll_PeekMessageA]
cmp eax, ebp
jne 0x406e2f
push 1
push ebp
push ebp
lea ecx, [esp + 0x54]
push ebp
push ecx
call ebx
test eax, eax
je 0x406e0b
mov eax, dword [0x413aec]
lea edx, [esp + 0x48]
push edx
push eax
call dword [sym.imp.USER32.dll_IsDialogMessageA]
test eax, eax
jne 0x406e01
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [0x413b5c], ebp
jne 0x406e2f
jmp 0x406dc6
mov eax, dword [0x413b5c]
cmp eax, ebp
jne 0x406e2f
cmp dword [0x413b74], ebp
je 0x406e45
mov ecx, dword [esp + 0x18]
inc ecx
cmp ecx, 0x186a0
mov dword [esp + 0x18], ecx
jge 0x406e45
jmp 0x406dc2
mov eax, dword [esi + 0x10]
push 0x30
push 0x413b7c
push 0x410114
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x64]
push ecx
push edi
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x64]
push 0xa
push edi
lea ebp, [edx + eax]
mov dword [esp + 0x30], ebp
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
cdq
idiv ebp
push edi
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 0
dec eax
mov dword [esp + 0x30], eax
call dword [sym.imp.GDI32.dll_StartPage]
mov ebx, dword [esp + 0x10]
jmp 0x406ef5
mov ecx, dword [esi + 0x10]
push 0x104
lea edx, [esp + 0xa0]
call fcn.0040dad0
test eax, eax
je 0x4071dc
lea ecx, [esp + 0x1a0]
push 0x1001
lea edx, [esp + 0xa0]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x10], ebx
jne 0x406ef1
mov eax, dword [esi + 0x10]
push 0x10
push 0x413b7c
push 0x4100bc
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x318
ret
mov edi, dword [esp + 0x10]
push 0x800
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
test ebp, ebp
jne 0x406f3f
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x406f1e
push ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov ecx, dword [esi + 0x10]
push 0x10
push 0x413b7c
push 0x410098
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x318
ret
xor eax, eax
cmp word [esi], ax
jbe 0x406f6d
mov edx, 0xffff7fff
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + eax*4]
mov ebx, dword [ecx + 6]
and ebx, edx
inc eax
mov dword [ecx + 6], ebx
xor ecx, ecx
mov cx, word [esi]
cmp eax, ecx
jl 0x406f4b
jmp 0x406f6d
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
mov ecx, esi
call fcn.004071f0
mov ebx, eax
test ebx, ebx
je 0x407171
mov eax, dword [ebx + 6]
push esi
or ah, 0x80
push 0x100
lea edx, [esp + 0x230]
mov ecx, ebx
mov dword [ebx + 6], eax
call fcn.00406c00
mov ecx, ebp
mov edi, eax
mov edx, dword [esp + 0x14]
mov byte [ebp], 0
call fcn.00406c40
xor eax, eax
mov ax, word [ebx + 0xa]
cmp eax, 6
jle 0x406fde
lea edx, [eax - 1]
mov eax, 0xaaaaaaab
mul edx
shr edx, 2
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x14]
mov ecx, ebp
call fcn.00406c40
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
jne 0x406fc8
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, esi
call fcn.004071f0
mov esi, eax
test esi, esi
je 0x4070c6
jmp 0x406ffd
mov edi, dword [esp + 0x20]
mov ax, word [esi + 0xa]
cmp ax, word [ebx + 0xa]
jb 0x4070c6
xor ecx, ecx
xor edx, edx
mov cx, word [ebx + 0xc]
mov dx, word [esi + 0xc]
add ecx, 8
cmp edx, ecx
jg 0x4070c6
mov eax, dword [esi + 6]
or ecx, 0xffffffff
or ah, 0x80
mov dword [esp + 0x30], ebx
mov dword [esi + 6], eax
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x228]
not ecx
dec ecx
push eax
mov edi, ecx
push 0x100
mov ecx, esi
mov ebx, esi
call fcn.00406c00
mov ecx, ebp
mov edx, dword [esp + 0x14]
mov dword [esp + 0x20], eax
call fcn.00406c40
mov edx, dword [esp + 0x30]
lea eax, [edi*4]
sub eax, edi
xor ecx, ecx
mov cx, word [edx + 0xa]
neg eax
shl eax, 1
sub eax, ecx
xor ecx, ecx
mov cx, word [esi + 0xa]
add eax, ecx
cmp eax, 0xc
jle 0x4070a7
lea edx, [eax - 7]
mov eax, 0xaaaaaaab
mul edx
mov esi, edx
shr esi, 2
mov edx, dword [esp + 0x14]
mov ecx, ebp
call fcn.00406c40
dec esi
jne 0x407099
mov eax, dword [esp + 0x20]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, dword [esp + 0x1c]
call fcn.004071f0
mov esi, eax
test esi, esi
jne 0x406ff9
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x407111
mov edi, 0x4100b8
or ecx, 0xffffffff
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [esp + 0x14]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll__lwrite]
jmp 0x406f65
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, dword [esp + 0x18]
push eax
mov eax, esi
mov ecx, dword [esp + 0x14]
imul eax, dword [esp + 0x2c]
push ebp
push eax
push 0
push ecx
call dword [sym.imp.GDI32.dll_TextOutA]
inc esi
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x18], esi
cmp esi, eax
jle 0x406f65
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], 1
push edx
call dword [sym.imp.GDI32.dll_EndPage]
test eax, eax
mov dword [esp + 0x24], eax
jl 0x40716d
mov eax, dword [0x413b5c]
test eax, eax
jne 0x40716d
jmp 0x406f65
mov edi, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4071d1
mov eax, dword [esp + 0x24]
test eax, eax
jl 0x4071b2
mov eax, dword [0x413b5c]
test eax, eax
jne 0x4071b2
push edi
call dword [sym.imp.GDI32.dll_EndPage]
push edi
call dword [sym.imp.GDI32.dll_EndDoc]
mov ecx, dword [0x413aec]
push ecx
call dword [sym.imp.USER32.dll_DestroyWindow]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x318
ret
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll__lclose]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x318
ret