Function at 0x4055d0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40c
mov eax, dword [0x41c054]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [0x41e1e4]
push edi
mov edi, ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x3f4], edi
mov dword [esi], eax
mov dword [esi + 4], ecx
call fcn.00405830
mov ecx, dword [edi]
mov ebx, dword [esi + 8]
lea eax, [ecx - 0x10]
sub ebx, 0x10
xor edi, edi
cmp eax, ebx
je 0x405660
cmp dword [ebx + 0xc], edi
jl 0x405652
mov edx, dword [eax]
cmp edx, dword [ebx]
jne 0x405652
call fcn.00407b00
mov dword [ebp - 0x3fc], eax
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405644
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov ecx, dword [ebp - 0x3fc]
add ecx, 0x10
mov dword [esi + 8], ecx
jmp 0x405660
mov edi, dword [ecx - 0xc]
push ecx
lea ebx, [esi + 8]
call fcn.00407960
xor edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea edx, [ebp - 0x400]
push edx
mov dword [ebp - 0x400], edi
mov dword [ebp - 0x3fc], edi
mov dword [ebp - 0x404], edi
call ebx
mov eax, dword [ebp - 0x3fc]
mov ecx, dword [ebp - 0x400]
push edi
push 0x2710
push eax
push ecx
call fcn.004116e0
sub eax, dword [esi]
sbb edx, dword [esi + 4]
push edx
push eax
lea eax, [ebp - 0x3f0]
push str._nBegin_load_ocdll__d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea ecx, [ebp - 0x3f0]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edx, dword [ebp - 0x3f4]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x3f8]
push eax
mov dword [ebp - 0x3f8], edi
mov dword [ebp - 0x3f4], edi
mov dword [ebp - 0x404], edi
call ebx
mov eax, dword [ebp - 0x3f4]
mov ecx, dword [ebp - 0x3f8]
push edi
push 0x2710
push eax
push ecx
call fcn.004116e0
sub eax, dword [esi]
lea ecx, [ebp - 0x3f0]
sbb edx, dword [esi + 4]
push edx
push eax
push str._nDone_load_ocdll__d
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea edx, [ebp - 0x3f0]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [esi + 0xc]
cmp eax, edi
je 0x405810
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.StartOC
push eax
call ebx
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0xc]
push str.HandleOCEvent
push eax
call ebx
mov ecx, dword [esi + 0xc]
push str.HandleKeypressEvent
push ecx
mov dword [esi + 0x1c], eax
call ebx
mov edx, dword [esi + 0xc]
push str.EndOC
push edx
mov dword [esi + 0x18], eax
call ebx
mov dword [esi + 0x20], eax
lea eax, [ebp - 0x3f8]
push eax
mov dword [ebp - 0x3f8], edi
mov dword [ebp - 0x3f4], edi
mov dword [ebp - 0x404], edi
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [ebp - 0x3f4]
mov ecx, dword [ebp - 0x3f8]
push edi
push 0x2710
push eax
push ecx
call fcn.004116e0
sub eax, dword [esi]
lea ecx, [ebp - 0x3f0]
sbb edx, dword [esi + 4]
push edx
push eax
push str._nDone_mapping_dll_functions__d
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add esp, 0x10
lea edx, [ebp - 0x3f0]
push edx
call ebx
cmp dword [esi + 0x14], edi
je 0x405802
cmp dword [esi + 0x1c], edi
je 0x405802
cmp dword [esi + 0x20], edi
je 0x405802
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408828
mov esp, ebp
pop ebp
ret 8
call fcn.00405830
push str._nMissing_required_functions
call ebx
jmp 0x405816
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00408828
mov esp, ebp
pop ebp
ret 8