Function at 0x437180
Capabilities:
Link many functions at runtime

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x43ebe1
push eax
mov al, byte [0x45c065]
mov dword fs:[0], esp
sub esp, 0x1c
test al, 1
push ebx
push ebp
push esi
jne 0x4371d1
mov bl, al
push 0x45c084
or bl, 1
mov dword [0x45c080], 0x440fac
mov byte [0x45c065], bl
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4378f0
call fcn.0043d3f8
add esp, 4
mov eax, dword [esp + 0x38]
xor ebx, ebx
cmp eax, ebx
jne 0x43743f
cmp dword [0x45bd5c], ebx
jne 0x43750e
xor eax, eax
mov dword [esp + 0x10], 0x440fb0
cmp eax, 0x45c080
mov dword [esp + 0x14], 0x45c080
je 0x43720f
push 0x45c084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x457a24]
mov dword [esp + 0x30], ebx
inc eax
cmp eax, ebx
mov dword [0x457a24], eax
jle 0x43722f
xor ecx, ecx
cmp ecx, 0x45c080
jmp 0x437501
cmp dword [0x45bd5c], ebx
je 0x437244
xor edx, edx
cmp edx, 0x45c080
jmp 0x437501
mov ebp, dword [esp + 0x40]
lea eax, [esp + 0x18]
push ebp
push eax
call fcn.00437640
add esp, 8
mov eax, dword [eax + 4]
mov byte [esp + 0x30], 1
cmp eax, ebx
jne 0x437267
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_1
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x30], 3
cmp eax, ebx
je 0x43729b
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x437292
cmp al, 0xff
je 0x437292
dec al
mov byte [ecx], al
jmp 0x43729b
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 fcn.0043d02a
mov eax, dword [esp + 0x48]
mov byte [esp + 0x30], 4
cmp eax, ebx
push str.LogDll.dll
je 0x4372cf
push eax
lea ecx, [esp + 0x40]
push 0x457918
push ecx
jmp 0x4372de
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x3c]
push edx
push 0x457918
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 [0x45bd5c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x44]
mov esi, eax
call fcn.0043d02a
mov edx, dword [esp + 0x38]
push esi
push edx
lea eax, [esp + 0x4c]
push 0x4579fc
push eax
mov byte [esp + 0x40], 5
call sub.MFC42.DLL_CString::Format
mov eax, dword [0x45bd5c]
add esp, 0x10
cmp eax, ebx
jne 0x437363
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, 0x45c080
jmp 0x4374a4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push str.InitLog
push eax
xor edi, edi
call esi
mov edx, dword [0x45bd5c]
push str.FiniLog
push edx
mov dword [0x45bd70], eax
call esi
mov dword [0x45bd6c], eax
mov eax, dword [0x45bd5c]
push str.WriteLog
push eax
call esi
mov ecx, dword [0x45bd5c]
push str.GetLogLevel
push ecx
mov dword [0x45bd68], eax
call esi
mov edx, dword [0x45bd5c]
push str.RegModuleName
push edx
mov dword [0x45bd58], eax
call esi
mov dword [0x45bd64], eax
mov eax, dword [0x45bd5c]
push str.GetLogMsgCount
push eax
call esi
mov dword [0x45bd60], eax
mov eax, dword [0x45bd70]
cmp eax, ebx
je 0x4373ec
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, 0x45c080
je 0x43742a
push 0x45c084
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 0x437522
xor eax, eax
mov dword [esp + 0x10], 0x440fb0
cmp eax, 0x45c080
mov dword [esp + 0x14], 0x45c080
je 0x43746c
push 0x45c084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4579b0]
mov dword [esp + 0x30], 6
inc eax
cmp eax, ebx
mov dword [0x4579b0], eax
jle 0x43748d
xor ecx, ecx
cmp ecx, 0x45c080
jmp 0x437501
mov eax, dword [0x45bd6c]
cmp eax, ebx
je 0x43749c
call eax
cmp eax, ebx
je 0x4374c6
xor edx, edx
cmp edx, 0x45c080
je 0x4374b1
push 0x45c084
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 [0x45bd5c]
mov dword [0x45bd70], ebx
cmp eax, ebx
mov dword [0x45bd6c], ebx
mov dword [0x45bd68], ebx
mov dword [0x45bd58], ebx
mov dword [0x45bd64], ebx
je 0x4374fa
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x45bd5c], ebx
xor eax, eax
cmp eax, 0x45c080
je 0x43750e
push 0x45c084
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 0x437565
cmp dword [0x45bd5c], ebx
je 0x4374b1
mov ecx, dword [0x45bd68]
xor eax, eax
cmp ecx, ebx
je 0x4374b4
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 0x43759b
cmp dword [0x45bd5c], ebx
je 0x4374b1
mov ecx, dword [0x45bd60]
or eax, 0xffffffff
cmp ecx, ebx
je 0x4374b4
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 0x4375e3
cmp dword [0x45bd5c], ebx
jne 0x4375bf
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 [0x45bd58]
xor eax, eax
cmp ecx, ebx
je 0x4374b4
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 0x4374b1
cmp dword [0x45bd5c], ebx
jne 0x43760b
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 [0x45bd64]
xor eax, eax
cmp ecx, ebx
je 0x4374b4
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