Function at 0x436650
Capabilities:
Link many functions at runtime

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x43e0d1
push eax
mov al, byte [0x45e981]
mov dword fs:[0], esp
sub esp, 0x1c
test al, 1
push ebx
push ebp
push esi
jne 0x4366a1
mov bl, al
push 0x45e9a4
or bl, 1
mov dword [0x45e9a0], 0x441fcc
mov byte [0x45e981], bl
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x436dc0
call fcn.0043c73a
add esp, 4
mov eax, dword [esp + 0x38]
xor ebx, ebx
cmp eax, ebx
jne 0x43690f
cmp dword [0x45e69c], ebx
jne 0x4369de
xor eax, eax
mov dword [esp + 0x10], 0x441fd0
cmp eax, 0x45e9a0
mov dword [esp + 0x14], 0x45e9a0
je 0x4366df
push 0x45e9a4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x458184]
mov dword [esp + 0x30], ebx
inc eax
cmp eax, ebx
mov dword [0x458184], eax
jle 0x4366ff
xor ecx, ecx
cmp ecx, 0x45e9a0
jmp 0x4369d1
cmp dword [0x45e69c], ebx
je 0x436714
xor edx, edx
cmp edx, 0x45e9a0
jmp 0x4369d1
mov ebp, dword [esp + 0x40]
lea eax, [esp + 0x18]
push ebp
push eax
call fcn.00436b10
add esp, 8
mov eax, dword [eax + 4]
mov byte [esp + 0x30], 1
cmp eax, ebx
jne 0x436737
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x30], 3
cmp eax, ebx
je 0x43676b
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x436762
cmp al, 0xff
je 0x436762
dec al
mov byte [ecx], al
jmp 0x43676b
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x38]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esp + 0x48]
mov byte [esp + 0x30], 4
cmp eax, ebx
push str.LogDll.dll
je 0x43679f
push eax
lea ecx, [esp + 0x40]
push 0x458078
push ecx
jmp 0x4367ae
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x3c]
push edx
push 0x458078
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x48]
add esp, 0x10
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x45e69c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x44]
mov esi, eax
call sub.MFC42.DLL_CString::CString_1
mov edx, dword [esp + 0x38]
push esi
push edx
lea eax, [esp + 0x4c]
push 0x45815c
push eax
mov byte [esp + 0x40], 5
call sub.MFC42.DLL_CString::Format
mov eax, dword [0x45e69c]
add esp, 0x10
cmp eax, ebx
jne 0x436833
lea ecx, [esp + 0x44]
mov byte [esp + 0x30], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x38]
mov byte [esp + 0x30], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], bl
call sub.MFC42.DLL_CString::CString
xor ecx, ecx
cmp ecx, 0x45e9a0
jmp 0x436974
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push str.InitLog
push eax
xor edi, edi
call esi
mov edx, dword [0x45e69c]
push str.FiniLog
push edx
mov dword [0x45e6b0], eax
call esi
mov dword [0x45e6ac], eax
mov eax, dword [0x45e69c]
push str.WriteLog
push eax
call esi
mov ecx, dword [0x45e69c]
push str.GetLogLevel
push ecx
mov dword [0x45e6a8], eax
call esi
mov edx, dword [0x45e69c]
push str.RegModuleName
push edx
mov dword [0x45e698], eax
call esi
mov dword [0x45e6a4], eax
mov eax, dword [0x45e69c]
push str.GetLogMsgCount
push eax
call esi
mov dword [0x45e6a0], eax
mov eax, dword [0x45e6b0]
cmp eax, ebx
je 0x4368bc
mov ecx, dword [esp + 0x40]
push ebp
push ecx
call eax
add esp, 8
mov edi, eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x34], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x3c]
mov byte [esp + 0x34], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x34], bl
call sub.MFC42.DLL_CString::CString
xor edx, edx
cmp edx, 0x45e9a0
je 0x4368fa
push 0x45e9a4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
cmp eax, 1
jne 0x4369f2
xor eax, eax
mov dword [esp + 0x10], 0x441fd0
cmp eax, 0x45e9a0
mov dword [esp + 0x14], 0x45e9a0
je 0x43693c
push 0x45e9a4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x458110]
mov dword [esp + 0x30], 6
inc eax
cmp eax, ebx
mov dword [0x458110], eax
jle 0x43695d
xor ecx, ecx
cmp ecx, 0x45e9a0
jmp 0x4369d1
mov eax, dword [0x45e6ac]
cmp eax, ebx
je 0x43696c
call eax
cmp eax, ebx
je 0x436996
xor edx, edx
cmp edx, 0x45e9a0
je 0x436981
push 0x45e9a4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or eax, 0xffffffff
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
mov eax, dword [0x45e69c]
mov dword [0x45e6b0], ebx
cmp eax, ebx
mov dword [0x45e6ac], ebx
mov dword [0x45e6a8], ebx
mov dword [0x45e698], ebx
mov dword [0x45e6a4], ebx
je 0x4369ca
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x45e69c], ebx
xor eax, eax
cmp eax, 0x45e9a0
je 0x4369de
push 0x45e9a4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
cmp eax, 2
jne 0x436a35
cmp dword [0x45e69c], ebx
je 0x436981
mov ecx, dword [0x45e6a8]
xor eax, eax
cmp ecx, ebx
je 0x436984
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x48]
push eax
push edx
call ecx
add esp, 0xc
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
cmp eax, 5
jne 0x436a6b
cmp dword [0x45e69c], ebx
je 0x436981
mov ecx, dword [0x45e6a0]
or eax, 0xffffffff
cmp ecx, ebx
je 0x436984
call ecx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
cmp eax, 3
jne 0x436ab3
cmp dword [0x45e69c], ebx
jne 0x436a8f
pop esi
pop ebp
mov eax, 0xffffd8f0
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
mov ecx, dword [0x45e698]
xor eax, eax
cmp ecx, ebx
je 0x436984
call ecx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
cmp eax, 4
jne 0x436981
cmp dword [0x45e69c], ebx
jne 0x436adb
pop esi
pop ebp
mov eax, 0xffffd8f0
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
mov ecx, dword [0x45e6a4]
xor eax, eax
cmp ecx, ebx
je 0x436984
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
push eax
push edx
call ecx
mov ecx, dword [esp + 0x30]
add esp, 8
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
add esp, 0x28
ret