Function at 0x501f82e8
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdfc
push ebx
push esi
test dl, dl
je 0x501f82ff
add esp, 0xfffffff0
call sub.rtl120.bpl__System__ClassCreate_qqrp17System_TMetaClasso
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call sub.rtl120.bpl__Classes_TComponent__bctr_qqrp18Classes_TComponent
mov eax, dword [sym.imp.rtl120.bpl__System_IsLibrary]
cmp byte [eax], 0
jne 0x501f832c
push 0
call sub.ole32.dll_OleInitialize
test eax, 0x80000000
sete al
mov byte [ebx + 0x17c], al
mov eax, dword [sym.imp.rtl120.bpl__Classes_ApplicationHandleException]
cmp word [eax + 2], 0
jne 0x501f8346
mov eax, dword [sym.imp.rtl120.bpl__Classes_ApplicationHandleException]
mov dword [eax + 4], ebx
mov dword [eax], sym.vcl120.bpl__Forms_TApplication_HandleException_qqrp14System_TObject
mov eax, dword [sym.imp.rtl120.bpl__Classes_ApplicationShowException]
cmp word [eax + 2], 0
jne 0x501f8360
mov eax, dword [sym.imp.rtl120.bpl__Classes_ApplicationShowException]
mov dword [eax + 4], ebx
mov dword [eax], sym.vcl120.bpl__Forms_TApplication_ShowException_qqrp18Sysutils_Exception
mov byte [ebx + 0x31], 0
mov dl, 1
mov eax, dword [sym.vcl120.bpl__Graphics_TFont_]
call sym.vcl120.bpl__Graphics_TFont__bctr_qqrv
mov esi, eax
mov dword [ebx + 0x38], esi
mov dword [esi + 0xc], ebx
mov dword [esi + 8], sym.vcl120.bpl__Forms_TApplication_DefaultFontChanged_qqrp14System_TObject
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Classes_TList_]
call sub.rtl120.bpl__System_TObject__bctr_qqrv
mov dword [ebx + 0x8c], eax
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Classes_TList_]
call sub.rtl120.bpl__System_TObject__bctr_qqrv
mov dword [ebx + 0xac], eax
xor eax, eax
mov dword [ebx + 0x5c], eax
xor eax, eax
mov dword [ebx + 0x80], eax
mov dword [ebx + 0x58], 0xff000018
mov dword [ebx + 0x74], 0x1f4
mov byte [ebx + 0x78], 1
xor eax, eax
mov dword [ebx + 0x7c], eax
mov dword [ebx + 0x70], 0x9c4
mov byte [ebx + 0x84], 0
mov byte [ebx + 0xa1], 1
mov byte [ebx + 0xb8], 1
mov dl, 1
mov eax, dword [0x50125658]
call sym.vcl120.bpl__Graphics_TIcon__bctr_qqrv
mov esi, eax
mov dword [ebx + 0x9c], esi
push 0x501f853c
mov eax, dword [sym.imp.rtl120.bpl__System_MainInstance]
mov eax, dword [eax]
push eax
call sub.user32.dll_LoadIconW
mov edx, eax
mov eax, esi
call sym.vcl120.bpl__Graphics_TIcon_SetHandle_qqrp7HICON__
mov eax, dword [ebx + 0x9c]
mov dword [eax + 0x14], ebx
mov dword [eax + 0x10], sym.vcl120.bpl__Forms_TApplication_IconChanged_qqrp14System_TObject
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Classes_TList_]
call sub.rtl120.bpl__System_TObject__bctr_qqrv
mov dword [ebx + 0x94], eax
push pe_nt_image_headers32
lea eax, [ebp - 0x202]
push eax
mov eax, dword [sym.imp.rtl120.bpl__System_MainInstance]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_GetModuleFileNameW
lea eax, [ebp - 0x202]
mov dx, 0x5c
call sub.rtl120.bpl__Sysutils_StrRScan_qqrpxbb
test eax, eax
je 0x501f846e
lea edx, [eax + 2]
lea eax, [ebp - 0x202]
call sub.rtl120.bpl__Sysutils_StrCopy_qqrpbpxb
lea eax, [ebp - 0x202]
mov dx, 0x2e
call sub.rtl120.bpl__Sysutils_StrScan_qqrpxbb
test eax, eax
je 0x501f8486
mov word [eax], 0
lea eax, [ebp - 0x202]
push eax
call sub.user32.dll_CharNextW
push eax
call sub.user32.dll_CharLowerW
lea eax, [ebx + 0x88]
lea edx, [ebp - 0x202]
mov ecx, pe_nt_image_headers32
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
push ebx
push sym.vcl120.bpl__Forms_TApplication_PopupControlProc_qqrr17Messages_TMessage
call fcn.501edd04
mov dword [ebx + 0x178], eax
mov byte [ebx + 0xcc], 0
mov eax, dword [sym.imp.rtl120.bpl__System_IsLibrary]
cmp byte [eax], 0
jne 0x501f84d7
mov eax, ebx
call sym.vcl120.bpl__Forms_TApplication_CreateHandle_qqrv
mov byte [ebx + 0x55], 1
mov byte [ebx + 0x56], 1
mov byte [ebx + 0x57], 1
mov byte [ebx + 0xa2], 1
mov byte [ebx + 0xcd], 0
mov byte [ebx + 0xd8], 0
xor eax, eax
mov dword [ebx + 0xd0], eax
mov byte [ebx + 0xcf], 0
xor eax, eax
mov dword [ebx + 0xa4], eax
mov eax, ebx
call sym.vcl120.bpl__Forms_TApplication_ValidateHelpSystem_qqrv
mov eax, ebx
call sym.vcl120.bpl__Forms_TApplication_HookSynchronizeWakeup_qqrv
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x501f8534
call sub.rtl120.bpl__System__AfterConstruction_qqrp14System_TObject
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret