Function at 0x501b3a94
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe0
mov ebp, edx
mov ebx, eax
lea eax, [ebx + 0x94]
xor ecx, ecx
mov edx, 0x54
call sub.rtl120.bpl__System__FillChar_qqrpvib
lea esi, [ebx + 0x94]
mov dword [esi], 0x54
mov eax, dword [sym.vcl120.bpl__Forms_Application]
mov eax, dword [eax]
cmp byte [eax + 0xcc], 0
je 0x501b3afb
xor ecx, ecx
mov dl, 1
mov eax, dword [0x501b114c]
call sym.vcl120.bpl__Controls_TWinControl__bctr_qqrp18Classes_TComponent
mov edi, eax
mov dword [ebx + 0x3c], edi
mov eax, edi
mov dword [eax + 0x260], ebx
mov dword [eax + 0x264], ebp
mov eax, dword [ebx + 0x3c]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
mov dword [esi + 4], eax
jmp 0x501b3b03
call fcn.501b0ff8
mov dword [esi + 4], eax
mov eax, dword [0x50245004]
mov dword [esi + 0x3c], eax
lea edx, [esi + 0xc]
lea eax, [esp + 4]
call fcn.501b3344
mov eax, dword [esp + 4]
call fcn.501b34dc
mov dword [esi + 8], eax
mov dword [esi + 0x10], 0x400
lea eax, [ebx + 0x94]
push eax
call sub.comdlg32.dll_PageSetupDlgW
mov dword [esi + 0x10], 0x42000
movzx eax, byte [ebx + 0xf0]
dec al
je 0x501b3b52
dec al
jne 0x501b3b56
add dword [esi + 0x10], 4
jmp 0x501b3b56
add dword [esi + 0x10], 8
test byte [ebx + 0x68], 1
je 0x501b3b60
add dword [esi + 0x10], 0
test byte [ebx + 0x68], 2
je 0x501b3b6a
add dword [esi + 0x10], 0x10
test byte [ebx + 0x68], 4
je 0x501b3b77
add dword [esi + 0x10], 0x100
test byte [ebx + 0x68], 8
je 0x501b3b86
add dword [esi + 0x10], 0x80000
jmp 0x501b3b93
mov dword [0x50245150], ebx
mov dword [esi + 0x48], 0x501b38d4
test byte [ebx + 0x68], 0x10
je 0x501b3ba0
add dword [esi + 0x10], 0x200
test byte [ebx + 0x68], 0x20
je 0x501b3baa
add dword [esi + 0x10], 0x20
test byte [ebx + 0x68], 0x40
je 0x501b3bb4
add dword [esi + 0x10], 2
test byte [ebx + 0x68], 0x80
je 0x501b3bbd
inc dword [esi + 0x10]
test byte [ebx + 0x69], 1
je 0x501b3bca
add dword [esi + 0x10], 0x800
test byte [ebx + 0x69], 2
jne 0x501b3bd7
add dword [esi + 0x10], 0x80
test byte [ebx + 0x69], 4
je 0x501b3be4
add dword [esi + 0x10], 0x200000
lea ecx, [esp + 8]
mov edx, dword [ebx + 0x90]
mov eax, dword [ebx + 0x8c]
call sub.rtl120.bpl__Classes_Point_qqrii
mov eax, dword [esp + 8]
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0xc]
mov dword [esi + 0x18], eax
mov eax, dword [ebx + 0x78]
push eax
lea eax, [esp + 0x14]
push eax
mov ecx, dword [ebx + 0x74]
mov edx, dword [ebx + 0x70]
mov eax, dword [ebx + 0x6c]
call sub.rtl120.bpl__Classes_Rect_qqriiii
push esi
lea edi, [esi + 0x1c]
lea esi, [esp + 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop esi
mov eax, dword [ebx + 0x88]
push eax
lea eax, [esp + 0x14]
push eax
mov ecx, dword [ebx + 0x84]
mov edx, dword [ebx + 0x80]
mov eax, dword [ebx + 0x7c]
call sub.rtl120.bpl__Classes_Rect_qqriiii
push esi
lea edi, [esi + 0x2c]
lea esi, [esp + 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop esi
mov dword [esi + 0x44], fcn.501b10e4
lea ecx, [ebx + 0x94]
mov edx, sub.comdlg32.dll_PageSetupDlgW
mov eax, ebx
mov esi, dword [eax]
call dword [esi + 0x38]
cmp eax, 1
sbb eax, eax
inc eax
mov byte [esp], al
lea esi, [ebx + 0x94]
cmp byte [esp], 0
je 0x501b3cc6
mov eax, dword [esi + 0x14]
mov dword [ebx + 0x8c], eax
mov eax, dword [esi + 0x18]
mov dword [ebx + 0x90], eax
mov eax, dword [esi + 0x2c]
mov dword [ebx + 0x7c], eax
mov eax, dword [esi + 0x30]
mov dword [ebx + 0x80], eax
mov eax, dword [esi + 0x34]
mov dword [ebx + 0x84], eax
mov eax, dword [esi + 0x38]
mov dword [ebx + 0x88], eax
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
call fcn.501b3458
jmp 0x501b3cea
mov eax, dword [esi + 8]
test eax, eax
je 0x501b3cd8
push eax
call fcn.5012228c
xor eax, eax
mov dword [esi + 8], eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x501b3cea
push eax
call fcn.5012228c
xor eax, eax
mov dword [esi + 0xc], eax
movzx eax, byte [esp]
add esp, 0x20
pop ebp
pop edi
pop esi
pop ebx
ret