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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb8
mov ebp, edx
mov edi, eax
lea esi, [esp + 4]
mov dword [esi], 0x42
mov eax, dword [0x50245004]
mov dword [esi + 0x22], eax
lea edx, [esi + 0xc]
mov eax, esp
call fcn.501b3344
mov eax, dword [esp]
call fcn.501b34dc
mov dword [esi + 8], eax
movzx eax, byte [edi + 0x73]
mov eax, dword [eax*4 + 0x502432ac]
or eax, 0x3000
mov dword [esi + 0x14], eax
cmp byte [edi + 0x70], 0
je 0x501b36c3
add dword [esi + 0x14], 0x10
test byte [edi + 0x71], 1
jne 0x501b36d0
add dword [esi + 0x14], 0x100000
test byte [edi + 0x71], 2
jne 0x501b36da
add dword [esi + 0x14], 8
test byte [edi + 0x71], 4
jne 0x501b36e4
add dword [esi + 0x14], 4
test byte [edi + 0x71], 0x20
je 0x501b36f1
add dword [esi + 0x14], 0x80000
cmp byte [edi + 0x72], 0
je 0x501b36fb
add dword [esi + 0x14], 0x20
test byte [edi + 0x71], 0x10
je 0x501b3708
add dword [esi + 0x14], 0x800
test byte [edi + 0x71], 8
jne 0x501b3715
add dword [esi + 0x14], 0x80
mov eax, dword [edi + 0x60]
test eax, eax
je 0x501b3730
or dword [esi + 0x14], 0x4000
mov dword [esi + 0x32], eax
mov eax, dword [edi + 0x40]
test eax, eax
je 0x501b3730
mov dword [esi + 0x22], eax
movzx eax, word [edi + 0x68]
mov word [esi + 0x18], ax
movzx eax, word [edi + 0x6c]
mov word [esi + 0x1a], ax
movzx eax, word [edi + 0x74]
mov word [esi + 0x1c], ax
movzx eax, word [edi + 0x78]
mov word [esi + 0x1e], ax
mov dword [esi + 0x2a], fcn.501b10e4
mov dword [esi + 0x2e], fcn.501b10e4
mov eax, dword [sym.vcl120.bpl__Forms_Application]
mov eax, dword [eax]
cmp byte [eax + 0xcc], 0
je 0x501b379c
xor ecx, ecx
mov dl, 1
mov eax, dword [0x501b114c]
call sym.vcl120.bpl__Controls_TWinControl__bctr_qqrp18Classes_TComponent
mov ebx, eax
mov dword [edi + 0x3c], ebx
mov eax, ebx
mov dword [eax + 0x260], edi
mov dword [eax + 0x264], ebp
mov eax, dword [edi + 0x3c]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
mov dword [esi + 4], eax
jmp 0x501b37a4
call fcn.501b0ff8
mov dword [esi + 4], eax
mov ecx, esi
mov edx, 0x50146f98
mov eax, edi
mov ebx, dword [eax]
call dword [ebx + 0x38]
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x501b382f
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
call fcn.501b3458
test byte [esi + 0x14], 0x10
setne al
mov byte [edi + 0x70], al
test byte [esi + 0x14], 0x20
setne al
mov byte [edi + 0x72], al
mov eax, dword [esi + 0x14]
test al, 1
je 0x501b37e8
mov byte [edi + 0x73], 1
jmp 0x501b37f6
test al, 2
je 0x501b37f2
mov byte [edi + 0x73], 2
jmp 0x501b37f6
mov byte [edi + 0x73], 0
movzx eax, word [esi + 0x18]
mov dword [edi + 0x68], eax
movzx eax, word [esi + 0x1a]
mov dword [edi + 0x6c], eax
movzx eax, word [esi + 0x20]
cmp ax, 1
jne 0x501b3823
call sym.vcl120.bpl__Printers_Printer_qqrv
call sym.vcl120.bpl__Printers_TPrinter_GetNumCopies_qqrv
mov edx, eax
mov eax, edi
call sym.vcl120.bpl__Dialogs_TPrintDialog_SetNumCopies_qqri
jmp 0x501b3853
movzx edx, ax
mov eax, edi
call sym.vcl120.bpl__Dialogs_TPrintDialog_SetNumCopies_qqri
jmp 0x501b3853
mov eax, dword [esi + 8]
test eax, eax
je 0x501b3841
push eax
call fcn.5012228c
xor eax, eax
mov dword [esi + 8], eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x501b3853
push eax
call fcn.5012228c
xor eax, eax
mov dword [esi + 0xc], eax
mov eax, ebx
add esp, 0x48
pop ebp
pop edi
pop esi
pop ebx
ret