Function at 0x501b3660
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.501b3330
mov eax, dword [esp]
call fcn.501b34c8
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 0x501b36af
add dword [esi + 0x14], 0x10
test byte [edi + 0x71], 1
jne 0x501b36bc
add dword [esi + 0x14], 0x100000
test byte [edi + 0x71], 2
jne 0x501b36c6
add dword [esi + 0x14], 8
test byte [edi + 0x71], 4
jne 0x501b36d0
add dword [esi + 0x14], 4
test byte [edi + 0x71], 0x20
je 0x501b36dd
add dword [esi + 0x14], 0x80000
cmp byte [edi + 0x72], 0
je 0x501b36e7
add dword [esi + 0x14], 0x20
test byte [edi + 0x71], 0x10
je 0x501b36f4
add dword [esi + 0x14], 0x800
test byte [edi + 0x71], 8
jne 0x501b3701
add dword [esi + 0x14], 0x80
mov eax, dword [edi + 0x60]
test eax, eax
je 0x501b371c
or dword [esi + 0x14], 0x4000
mov dword [esi + 0x32], eax
mov eax, dword [edi + 0x40]
test eax, eax
je 0x501b371c
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.501b10d0
mov dword [esi + 0x2e], fcn.501b10d0
mov eax, dword [0x50243f9c]
mov eax, dword [eax]
cmp byte [eax + 0xcc], 0
je 0x501b3788
xor ecx, ecx
mov dl, 1
mov eax, dword [0x501b1138]
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 0x501b3790
call fcn.501b0fe4
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 0x501b381b
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
call fcn.501b3444
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 0x501b37d4
mov byte [edi + 0x73], 1
jmp 0x501b37e2
test al, 2
je 0x501b37de
mov byte [edi + 0x73], 2
jmp 0x501b37e2
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 0x501b380f
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 0x501b383f
movzx edx, ax
mov eax, edi
call sym.vcl120.bpl__Dialogs_TPrintDialog_SetNumCopies_qqri
jmp 0x501b383f
mov eax, dword [esi + 8]
test eax, eax
je 0x501b382d
push eax
call sub.kernel32.dll_GlobalFree
xor eax, eax
mov dword [esi + 8], eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x501b383f
push eax
call sub.kernel32.dll_GlobalFree
xor eax, eax
mov dword [esi + 0xc], eax
mov eax, ebx
add esp, 0x48
pop ebp
pop edi
pop esi
pop ebx
ret