Function at 0x4c0140
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov ebx, ecx
call fcn.004c0ef0
push 0x58a97c
push 0x58a894
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4c0181
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp - 4], 0
push 0
setg al
push 0
mov byte [ebx + 0x18], al
lea eax, [ebp - 0x28]
push 0
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
mov esi, dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x4c0320
nop dword [eax]
mov eax, dword [ebp - 0x24]
cmp eax, 0x464
ja 0x4c01fb
je 0x4c01cf
cmp eax, 0xc8
jne 0x4c0210
mov ecx, ebx
call fcn.004c0af0
jmp 0x4c0308
mov eax, dword [ebx + 0x20]
sub eax, dword [ebx + 0x1c]
sar eax, 2
test eax, eax
je 0x4c01e8
mov ecx, ebx
call fcn.004c0470
jmp 0x4c0308
push dword [ebx + 0x4c]
push 0
call esi
mov dword [ebx + 0x4c], 0
jmp 0x4c0308
sub eax, 0x465
je 0x4c024a
sub eax, 1
je 0x4c0229
sub eax, 1
je 0x4c0308
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x4c0308
push dword [ebp - 0x20]
mov ecx, ebx
call fcn.004bf630
test al, al
jne 0x4c0308
push dword [ebp - 0x20]
mov ecx, ebx
call fcn.004bfd20
jmp 0x4c0308
mov edi, dword [ebx + 0x20]
mov esi, dword [ebx + 0x1c]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 4], ecx
cmp esi, edi
je 0x4c02f4
nop
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x4c02e9
call fcn.0046f470
mov ecx, dword [esi]
mov dword [ebp - 0xc], eax
mov ecx, dword [ecx + 0x34]
mov dword [ebp - 8], ecx
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x4c02a8
push str.QueryInterface
push dword [ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4c02a8
push 0xfc95582d
call eax
test eax, eax
je 0x4c02a8
mov ecx, dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ecx]
call eax
call fcn.0046f470
mov ecx, dword [esi]
mov dword [ebp - 8], eax
mov ecx, dword [ecx + 0x34]
mov dword [ebp - 0xc], ecx
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x4c02e6
push str.QueryInterface
push dword [ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4c02e6
push 0x57f41e06
call eax
test eax, eax
je 0x4c02e6
mov ecx, dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ecx]
call eax
mov ecx, dword [ebp - 4]
add esi, 4
cmp esi, edi
jne 0x4c0260
push 0x2614
push ecx
call fcn.00512108
mov esi, dword [sym.imp.USER32.dll_KillTimer]
add esp, 8
push 0
push 0
push 0
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x4c01b0
push dword [ebx + 0x4c]
push 0
call esi
mov esi, dword [ebx + 0x1c]
cmp esi, dword [ebx + 0x20]
je 0x4c03cb
call fcn.0046f470
mov ecx, dword [esi]
mov edi, eax
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 4]
test eax, eax
je 0x4c036d
push str.QueryInterface
push dword [eax + 0x18]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4c036d
push 0xfc95582d
call eax
test eax, eax
je 0x4c036d
push dword [ebp - 0xc]
push dword [edi]
call eax
call fcn.0046f470
mov ecx, dword [esi]
mov edi, eax
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 4]
test eax, eax
je 0x4c03a7
push str.QueryInterface
push dword [eax + 0x18]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4c03a7
push 0x57f41e06
call eax
test eax, eax
je 0x4c03a7
push dword [ebp - 0xc]
push dword [edi]
call eax
mov edi, dword [esi]
test edi, edi
je 0x4c03bf
mov ecx, edi
call fcn.004c3870
push 0x38
push edi
call fcn.00512108
add esp, 8
add esi, 4
cmp esi, dword [ebx + 0x20]
jne 0x4c0333
mov eax, dword [ebx + 0x1c]
mov dword [ebx + 0x20], eax
mov esi, dword [ebx + 0x28]
cmp esi, dword [ebx + 0x2c]
je 0x4c03fb
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [esi]
push dword [eax + 4]
call edi
push 8
push dword [esi]
call fcn.00512108
add esi, 4
add esp, 8
cmp esi, dword [ebx + 0x2c]
jne 0x4c03e0
mov eax, dword [ebx + 0x28]
pop edi
mov dword [ebx + 0x2c], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret