Function at 0x447210
Capabilities:
Allocate thread local storage
Check mutex on windows
Set thread local storage value

Disassembly:
push ebp
lea ebp, [esp - 0x2d80]
mov eax, 0x2d80
call fcn.004594d0
push 0xffffffffffffffff
push 0x46c921
mov eax, dword fs:[0]
push eax
sub esp, 0x3b8
mov eax, dword [0x4812a4]
xor eax, ebp
mov dword [ebp + 0x2d7c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x2d90]
mov dword [ebp - 0x30], eax
call fcn.00418aa0
mov edi, 0xf
mov dword [ebp - 0x38], edi
xor ebx, ebx
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
push 0x10
push str.BFBC2Updater.log
lea ecx, [ebp - 0x50]
call fcn.00407a50
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x50]
call fcn.0041bbf0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x38], 0x10
jb 0x4472a4
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.00449824
add esp, 4
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
push ebx
push 0x46feb4
lea ecx, [ebp + 0x2d60]
call fcn.00407a50
mov dword [ebp - 4], 1
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
push 0xa
push str..Main.cpp
lea ecx, [ebp - 0x50]
call fcn.00407a50
mov byte [ebp - 4], 2
lea edx, [ebp + 0x2d60]
push edx
push edi
push 4
lea eax, [ebp - 0x130]
push eax
lea edx, [ebp - 0x50]
call fcn.0041b9f0
mov byte [ebp - 4], 3
push 0x46feb4
add eax, 0x40
push eax
call fcn.00415db0
add esp, 8
mov byte [ebp - 4], 2
lea esi, [ebp - 0x130]
call fcn.0041ba90
mov byte [ebp - 4], 1
mov esi, 0x10
cmp dword [ebp - 0x38], esi
jb 0x44734a
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.00449824
add esp, 4
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x2d78], esi
jb 0x447371
mov edx, dword [ebp + 0x2d64]
push edx
call fcn.00449824
add esp, 4
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
push ebx
push 0x46feb4
lea ecx, [ebp - 0x50]
call fcn.00407a50
mov dword [ebp - 4], 4
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
push 0xa
push str..Main.cpp
lea ecx, [ebp + 0x2d60]
call fcn.00407a50
mov byte [ebp - 4], 5
lea eax, [ebp - 0x50]
push eax
push esi
push 4
lea ecx, [ebp - 0x130]
push ecx
lea edx, [ebp + 0x2d60]
call fcn.0041b9f0
mov byte [ebp - 4], 6
push str._______________________________________________________________________________________________________
add eax, 0x40
push eax
call fcn.00415db0
add esp, 8
mov byte [ebp - 4], 5
lea esi, [ebp - 0x130]
call fcn.0041ba90
mov byte [ebp - 4], 4
mov esi, 0x10
cmp dword [ebp + 0x2d78], esi
jb 0x447426
mov edx, dword [ebp + 0x2d64]
push edx
call fcn.00449824
add esp, 4
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x38], esi
jb 0x447450
mov eax, dword [ebp - 0x4c]
push eax
call fcn.00449824
add esp, 4
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
push ebx
push 0x46feb4
lea ecx, [ebp - 0x2c]
call fcn.00407a50
mov dword [ebp - 4], 7
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
push 0xa
push str..Main.cpp
lea ecx, [ebp + 0x2d60]
call fcn.00407a50
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x2c]
push ecx
push 0x11
push 4
lea edx, [ebp - 0x130]
push edx
lea edx, [ebp + 0x2d60]
call fcn.0041b9f0
mov byte [ebp - 4], 9
push str.WinMain_Enter
add eax, 0x40
push eax
call fcn.00415db0
add esp, 8
mov byte [ebp - 4], 8
lea esi, [ebp - 0x130]
call fcn.0041ba90
mov byte [ebp - 4], 7
mov esi, 0x10
cmp dword [ebp + 0x2d78], esi
jb 0x4474fd
mov eax, dword [ebp + 0x2d64]
push eax
call fcn.00449824
add esp, 4
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], esi
jb 0x447527
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00449824
add esp, 4
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
push ebx
push 0x46feb4
lea ecx, [ebp + 0x2d60]
call fcn.00407a50
mov dword [ebp - 4], 0xa
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
push 0xa
push str..Main.cpp
lea ecx, [ebp - 0x2c]
call fcn.00407a50
mov byte [ebp - 4], 0xb
lea edx, [ebp + 0x2d60]
push edx
push 0x12
push 4
lea eax, [ebp - 0x130]
push eax
lea edx, [ebp - 0x2c]
call fcn.0041b9f0
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x30]
push ecx
push str.Command_line:
add eax, 0x40
push eax
call fcn.00415db0
add esp, 8
push eax
call fcn.00415db0
add esp, 8
mov byte [ebp - 4], 0xb
lea esi, [ebp - 0x130]
call fcn.0041ba90
mov byte [ebp - 4], 0xa
mov esi, 0x10
cmp dword [ebp - 0x14], esi
jb 0x4475db
mov edx, dword [ebp - 0x28]
push edx
call fcn.00449824
add esp, 4
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x2d78], esi
jb 0x447602
mov eax, dword [ebp + 0x2d64]
push eax
call fcn.00449824
add esp, 4
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
lea ecx, [ebp + 0x2cb8]
push ecx
call fcn.0043d350
mov dword [ebp - 4], 0xd
mov edx, dword [ebp - 0x30]
push edx
lea ecx, [ebp + 0x2cb8]
call fcn.0043d520
test al, al
sete byte [ebp - 0x31]
mov dword [ebp + method.RegistryManager.virtual_0], vtable.RegistryManager.0
mov dword [ebp + 0x2d5c], edi
mov dword [ebp + 0x2d58], ebx
mov byte [ebp + 0x2d48], bl
mov byte [ebp - 4], 0xe
mov dword [ebp + 0x2d40], ebx
mov byte [ebp - 4], 0xf
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
push 0x32
push str.SOFTWAREElectronic_ArtsBattlefield_Bad_Company_2
lea ecx, [ebp - 0x2c]
call fcn.00407a50
mov byte [ebp - 4], 0x10
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp + 0x2cc4]
lea esi, [ebp + 0x2d3c]
call fcn.00427a50
mov byte [ebp - 4], 0xf
cmp dword [ebp - 0x14], 0x10
jb 0x4476ad
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00449824
add esp, 4
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
lea esi, [ebp + 0x2d60]
lea edi, [ebp + 0x2d3c]
call fcn.00427d70
mov byte [ebp - 4], 0x11
cmp dword [ebp + 0x2d74], ebx
je 0x4476de
mov edx, esi
push edx
call fcn.00419420
add esp, 4
mov byte [ebp - 4], 0xf
cmp dword [ebp + 0x2d78], 0x10
jb 0x4476fa
mov eax, dword [ebp + 0x2d64]
push eax
call fcn.00449824
add esp, 4
mov edi, 0xf
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
mov byte [ebp - 4], 0xd
lea ecx, [ebp + 0x2d3c]
call fcn.004279e0
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
push ebx
lea ecx, [ebp + 0x2d60]
push 0x46feb4
call fcn.00407a50
cmp byte [ebp - 0x31], bl
je 0x44786e
mov byte [ebp - 4], 0x12
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
push 0xa
push str..Main.cpp
lea ecx, [ebp - 0x2c]
call fcn.00407a50
mov byte [ebp - 4], 0x13
lea ecx, [ebp + 0x2d60]
push ecx
push 0x2b
push 0x10
lea edx, [ebp - 0x130]
push edx
lea edx, [ebp - 0x2c]
call fcn.0041b9f0
mov byte [ebp - 4], 0x14
push str.Missing_or_invalid_arguments.
add eax, 0x40
push eax
call fcn.00415db0
add esp, 8
mov byte [ebp - 4], 0x13
lea esi, [ebp - 0x130]
call fcn.0041ba90
mov byte [ebp - 4], 0x12
mov esi, 0x10
cmp dword [ebp - 0x14], esi
jb 0x4477c4
mov eax, dword [ebp - 0x28]
push eax
call fcn.00449824
add esp, 4
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
mov byte [ebp - 4], 0xd
cmp dword [ebp + 0x2d78], esi
jb 0x4477e8
mov ecx, dword [ebp + 0x2d64]
push ecx
call fcn.00449824
add esp, 4
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
push 0x1f
push str.INSTALLER_ERROR_WRONG_ARGUMENTS
lea ecx, [ebp - 0x2c]
call fcn.00407a50
mov byte [ebp - 4], 0x15
push 0x50030
call fcn.00419780
push eax
lea edi, [ebp - 0x2c]
call fcn.00419720
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov byte [ebp - 4], 0xd
cmp dword [ebp - 0x14], 0x10
jb 0x447847
mov edx, dword [ebp - 0x28]
push edx
call fcn.00449824
add esp, 4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x2cb8]
call fcn.0043d440
or eax, 0xffffffff
jmp 0x447f3d
mov byte [ebp - 4], 0x16
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
push 0xa
push str..Main.cpp
lea ecx, [ebp - 0x2c]
call fcn.00407a50
mov byte [ebp - 4], 0x17
lea eax, [ebp + 0x2d60]
push eax
push 0x34
push 4
lea ecx, [ebp - 0x130]
push ecx
lea edx, [ebp - 0x2c]
call fcn.0041b9f0
mov byte [ebp - 4], 0x18
lea edx, [ebp + 0x2cfc]
push edx
push str._HostName
lea ecx, [ebp + 0x2ce0]
push ecx
push str._SessionId
mov edx, dword [ebp + 0x2d34]
push edx
push str._loggedIn
mov ecx, dword [ebp + 0x2cc0]
push ecx
push str._InternallyElevated
mov edx, dword [ebp + 0x2cbc]
push edx
push str.Arguments:_ServerDeltaTime
add eax, 0x40
push eax
call fcn.00415db0
add esp, 8
push eax
call fcn.00407b20
push eax
call fcn.00415db0
add esp, 8
push eax
call fcn.00447f70
push eax
call fcn.00415db0
add esp, 8
push eax
call fcn.00447f70
push eax
call fcn.00415db0
add esp, 8
push eax
call fcn.00407250
add esp, 8
push eax
call fcn.00415db0
add esp, 8
push eax
call fcn.00407250
add esp, 8
mov byte [ebp - 4], 0x17
lea esi, [ebp - 0x130]
call fcn.0041ba90
mov byte [ebp - 4], 0x16
mov esi, 0x10
cmp dword [ebp - 0x14], esi
jb 0x447965
mov eax, dword [ebp - 0x28]
push eax
call fcn.00449824
add esp, 4
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
mov byte [ebp - 4], 0xd
cmp dword [ebp + 0x2d78], esi
jb 0x447989
mov ecx, dword [ebp + 0x2d64]
push ecx
call fcn.00449824
add esp, 4
mov dword [ebp + 0x2d78], edi
mov dword [ebp + 0x2d74], ebx
mov byte [ebp + 0x2d64], bl
mov dword [ebp - 0x54], ebx
cmp byte [ebp + 0x2cc0], bl
jne 0x447a8b
push str.BattlefieldBadCompany2Updater
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x54], eax
push 2
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, ebx
je 0x447a8b
push 0x46feb4
lea ecx, [ebp + 0x2d60]
call fcn.004091b0
mov byte [ebp - 4], 0x19
push str..Main.cpp
lea ecx, [ebp - 0x2c]
call fcn.004091b0
mov byte [ebp - 4], 0x1a
lea edx, [ebp + 0x2d60]
push edx
push 0x3f
push esi
lea eax, [ebp - 0x130]
push eax
lea edx, [ebp - 0x2c]
call fcn.0041b9f0
mov byte [ebp - 4], 0x1b
push str.There_is_already_another_updater_instance_running.
add eax, 0x40
push eax
call fcn.00415db0
add esp, 8
mov byte [ebp - 4], 0x1a
lea esi, [ebp - 0x130]
call fcn.0041ba90
mov byte [ebp - 4], 0x19
lea ecx, [ebp - 0x2c]
call fcn.00409220
mov byte [ebp - 4], 0xd
lea ecx, [ebp + 0x2d60]
call fcn.00409220
push str.INSTALLER_INSTANCE_RUNNING
lea ecx, [ebp - 0x2c]
call fcn.004091b0
mov byte [ebp - 4], 0x1c
push 0x50030
call fcn.00419780
push eax
lea edi, [ebp - 0x2c]
call fcn.00419720
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov byte [ebp - 4], 0xd
cmp dword [ebp - 0x14], 0x10
jb 0x447847
mov ecx, dword [ebp - 0x28]
push ecx
jmp 0x44783f
mov dword [ebp - 0x6c], 1
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
push ebx
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x5c]
push eax
call sub.gdiplus.dll_GdiplusStartup
cmp dword [0x484814], ebx
jne 0x447abc
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x484814], eax
mov dword [ebp - 0x30], ebx
mov byte [ebp - 4], 0x1d
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push ebx
push 0x443900
push 4
call dword [sym.imp.USER32.dll_SetWindowsHookExA]
mov esi, eax
mov dword [ebp - 0x30], esi
cmp esi, ebx
je 0x447af2
mov eax, dword [0x484814]
cmp eax, ebx
je 0x447af2
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
lea ecx, [ebp]
push ecx
call fcn.0042a210
mov byte [ebp - 4], 0x1e
mov dword [ebp - 0x58], 0xffffffff
lea edx, [ebp - 0x244]
push edx
call fcn.0041f210
mov byte [ebp - 4], 0x1f
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
push 0x18
push str.INSTALLER_ERROR_OCCURRED
lea ecx, [ebp - 0x2c]
call fcn.00407a50
mov byte [ebp - 4], 0x20
lea edi, [ebp - 0x2c]
call fcn.00419720
push eax
lea eax, [ebp - 0x23c]
push eax
call fcn.00420a90
add esp, 8
mov edi, eax
push 0xa
mov ecx, edi
call fcn.00420760
mov ecx, edi
call fcn.00420a30
mov byte [ebp - 4], 0x1f
cmp dword [ebp - 0x14], 0x10
jb 0x447b72
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00449824
add esp, 4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
mov byte [ebp - 4], 0x21
lea edx, [ebp + 0x2cb8]
push edx
lea ecx, [ebp]
call fcn.0042c480
mov dword [ebp - 0x58], eax
mov dword [ebp - 4], 0x1f
jmp 0x447e4e
mov eax, dword [0x484808]
cmp eax, ebx
je 0x447e5e
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [0x484808], ebx
mov eax, dword [0x48480c]
cmp eax, ebx
je 0x447e74
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [0x48480c], ebx
cmp esi, ebx
je 0x447e9b
push esi
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
xor esi, esi
mov dword [ebp - 0x30], esi
mov eax, dword [0x484814]
cmp eax, ebx
je 0x447eab
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x484814]
cmp eax, ebx
je 0x447eab
push eax
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov eax, dword [ebp - 0x5c]
push eax
call sub.gdiplus.dll_GdiplusShutdown
mov edi, dword [ebp - 0x54]
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
mov eax, dword [0x48269c]
cmp eax, 0xffffffff
je 0x447ede
push eax
call edi
mov dword [0x48269c], 0xffffffff
mov byte [ebp - 4], 0x1e
lea ecx, [ebp - 0x1f0]
call fcn.004206d0
lea ecx, [ebp - 0x1f0]
call fcn.0041f2e0
mov byte [ebp - 4], 0x1d
lea ecx, [ebp]
push ecx
call fcn.0042a560
mov byte [ebp - 4], 0xd
cmp esi, ebx
je 0x447f28
push esi
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
mov dword [ebp - 0x30], ebx
mov eax, dword [0x484814]
cmp eax, ebx
je 0x447f28
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x2cb8]
call fcn.0043d440
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2d7c]
xor ecx, ebp
call fcn.00449829
add ebp, 0x2d80
mov esp, ebp
pop ebp
ret 0x10