Function at 0x4075d0
Capabilities:
Check mutex on windows
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5640c6
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x9feb4
call fcn.00531970
mov eax, dword [0x5d72e0]
xor eax, esp
mov dword [esp + 0x9feb0], eax
push ebx
push esi
push edi
mov eax, dword [0x5d72e0]
xor eax, esp
push eax
lea eax, [esp + 0x9fec8]
mov dword fs:[0], eax
lea eax, [esp + 0x38]
mov esi, ecx
push eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], 8
mov dword [esp + 0x40], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, esi
call fcn.0051afef
push 0
call fcn.0051d890
add esp, 4
push 0x57fcc4
mov ecx, esi
call fcn.0051ce00
mov ecx, esi
call fcn.00405950
test eax, eax
je 0x4076af
push 0
lea ecx, [esp + 0xec8]
call fcn.00493710
mov dword [esp + 0x9fed0], 0
call fcn.00406b70
add eax, 4
push eax
lea ecx, [esp + 0xf90]
call fcn.00402060
lea ecx, [esp + 0xec4]
call fcn.005104b7
lea ecx, [esp + 0xec4]
mov dword [esp + 0x9fed0], 0xffffffff
call fcn.00406100
call fcn.00406b70
add eax, 4
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.004016a0
lea esi, [eax + 0x10]
mov dword [esp + 0x44], esi
mov dword [esp + 0x9fed4], 1
call fcn.004ea360
add esi, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push esi
mov ebx, eax
mov dword [esp + 0x3c], esi
call fcn.004016a0
add eax, 0x10
add esp, 4
mov ecx, ebx
mov dword [edi], eax
call fcn.004ea4b0
push str.ConfigModule.ini
call fcn.00406b70
add eax, 4
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.00402100
push 0x100
lea edx, [esp + 0x9fdcc]
push 0
push edx
mov byte [esp + 0x9fee8], 2
call fcn.00530d30
mov eax, dword [esp + 0x3c]
add esp, 0x18
push eax
push 0x100
lea ecx, [esp + 0x9fdc4]
push ecx
push 0x57e9e8
push str.Solution
push str.themes
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x9fdbc]
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x407765
sub eax, esi
push eax
lea edx, [esp + 0x9fdc0]
push edx
lea ecx, [esp + 0x2c]
call fcn.00401840
mov eax, dword [esp + 0x24]
cmp dword [eax - 0xc], 0
jne 0x40779a
push 0x64
mov ecx, ebx
call fcn.004ead40
jmp 0x407893
push str.Language_
call fcn.00406b70
add eax, 4
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00402100
lea edx, [esp + 0x30]
push edx
push eax
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0x9fee8], 3
call fcn.004065f0
push 0x57fc88
push eax
lea ecx, [esp + 0x3c]
push ecx
mov byte [esp + 0x9fef4], 4
call fcn.00402100
add esp, 0x24
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], 6
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40780d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407835
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x100
lea ecx, [esp + 0x9fdc0]
push 0
push ecx
call fcn.00530d30
mov edx, dword [esp + 0x28]
add esp, 0xc
push edx
push 0x64
push str.LanguageID
push str.Info
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push eax
mov ecx, ebx
call fcn.004ead40
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407893
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x57fc70
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov edi, dword [esp + 0x30]
mov dword [edi + 0xa4], eax
je 0x4078bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4078c6
cmp dword [edi + 0xa4], 0
jne 0x407916
push 0x30
push 0x57e9e8
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.Error.AlreadyRunning
call fcn.004019c0
lea ecx, [esp + 0x24]
push ecx
mov byte [esp + 0x9fee0], 8
call fcn.004ea360
mov ecx, eax
mov byte [esp + 0x9fee0], 2
call fcn.004ea820
mov eax, dword [eax]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
jmp 0x4082c1
push str.WndManager.ocx
call fcn.00406b70
add eax, 4
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00402100
add esp, 0xc
mov eax, dword [eax]
push eax
mov ecx, edi
mov byte [esp + 0x9fed4], 9
call fcn.00406930
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40796b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.MapCtrl.ocx
call fcn.00406b70
add eax, 4
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00402100
add esp, 0xc
mov eax, dword [eax]
push eax
mov ecx, edi
mov byte [esp + 0x9fed4], 0xa
call fcn.00406930
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4079c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.Skin_
call fcn.00406b70
add eax, 4
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.00402100
push str.theme.ini
push eax
lea edx, [esp + 0x2c]
mov bl, 0xb
push edx
mov byte [esp + 0x9fee8], bl
call fcn.00402100
add esp, 0x18
push eax
mov byte [esp + 0x9fed4], 0xc
call fcn.004eb110
mov ecx, eax
call fcn.004eb470
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407a30
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407a58
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.00518333
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x407a72
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push str.XMLusers.xml
mov byte [esp + 0x9fed4], 0xd
call fcn.00406b70
mov ecx, dword [eax + 4]
push ecx
lea edx, [esp + 0x1c]
push 0x57fc18
push edx
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407acc
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 4]
call fcn.004d2520
push str.XML_backup.xml
call fcn.00406b70
mov eax, dword [eax + 4]
push eax
lea ecx, [esp + 0x1c]
push 0x57fc18
push ecx
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407b1c
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0x134]
call fcn.004e1270
push str.XMLRecordPeriod.xml
call fcn.00406b70
mov edx, dword [eax + 4]
push edx
lea eax, [esp + 0x1c]
push 0x57fc18
push eax
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407b6f
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0x25c]
call fcn.004e1e50
push str.XMLPlanTemplate.xml
call fcn.00406b70
mov ecx, dword [eax + 4]
push ecx
lea edx, [esp + 0x1c]
push 0x57fc18
push edx
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407bc2
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0x378]
call fcn.004e2cc0
push str.XMLTourPlan.xml
call fcn.00406b70
mov eax, dword [eax + 4]
push eax
lea ecx, [esp + 0x1c]
push 0x57fc18
push ecx
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407c15
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0x6cc]
call fcn.004cfd40
push str.XMLTask.xml
call fcn.00406b70
mov edx, dword [eax + 4]
push edx
lea eax, [esp + 0x1c]
push 0x57fc18
push eax
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407c68
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0x7f0]
call fcn.004cd5e0
push str.XMLDecoderLayout.xml
call fcn.00406b70
mov ecx, dword [eax + 4]
push ecx
lea edx, [esp + 0x1c]
push 0x57fc18
push edx
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407cbb
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0xd78]
call fcn.004ae480
push str.XMLDecoderTourPlan.xml
call fcn.00406b70
mov eax, dword [eax + 4]
push eax
lea ecx, [esp + 0x1c]
push 0x57fc18
push ecx
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407d0e
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0xe94]
call fcn.004b1be0
push str.XMLChnTimeInfo.xml
call fcn.00406b70
mov edx, dword [eax + 4]
push edx
lea eax, [esp + 0x1c]
push 0x57fc18
push eax
call fcn.004020e0
mov edx, dword [esp + 0x24]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, dword [edx - 4]
add esp, 0x10
or ecx, eax
jge 0x407d61
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov edx, dword [esp + 0x14]
push edx
call fcn.004aef60
mov ecx, eax
call fcn.004aec90
push str.XMLTimeDownload.xml
call fcn.00406b70
mov ecx, dword [eax + 4]
push ecx
lea edx, [esp + 0x1c]
push 0x57fc18
push edx
call fcn.004020e0
mov edx, dword [esp + 0x24]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, dword [edx - 4]
add esp, 0x10
or ecx, eax
jge 0x407db0
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov edx, dword [esp + 0x14]
push edx
call fcn.004ce650
mov ecx, eax
call fcn.004cea90
push str.XMLDevGroup.xml
call fcn.00406b70
mov eax, dword [eax + 4]
push eax
lea ecx, [esp + 0x1c]
push 0x57fc18
push ecx
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407dff
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0x490]
call fcn.004b3940
push str.XMLDownloadPlan.xml
mov ebx, eax
call fcn.00406b70
mov edx, dword [eax + 4]
push edx
lea eax, [esp + 0x1c]
push 0x57fc18
push eax
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407e54
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0x908]
call fcn.004e7950
push str.XMLDownloadPlanPeriod.xml
call fcn.00406b70
mov ecx, dword [eax + 4]
push ecx
lea edx, [esp + 0x1c]
push 0x57fc18
push edx
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407ea7
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0xa28]
call fcn.004e83e0
push str.XMLDownloadPlanTemplate.xml
call fcn.00406b70
mov eax, dword [eax + 4]
push eax
lea ecx, [esp + 0x1c]
push 0x57fc18
push ecx
call fcn.004020e0
mov esi, dword [esp + 0x24]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
add esp, 0x10
or ecx, eax
jge 0x407efa
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0xb44]
call fcn.004e9750
call fcn.0041fc60
cmp ebx, 0xffffff9a
jne 0x40804c
add eax, 0xfcc
cmp dword [eax + 8], 0
mov dword [esp + 0x1c], eax
jbe 0x40817e
push 1
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.DeviceManage.DefaultZone
call fcn.004019c0
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0x9fee0], 0xe
call fcn.004ea360
mov ecx, eax
mov byte [esp + 0x9fee0], 0xd
call fcn.004ea820
mov esi, dword [eax]
mov byte [esp + 0x9fed8], 0xf
call fcn.0041fc60
push esi
lea ecx, [eax + 0x490]
call fcn.004b3830
mov ebx, eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], 0xd
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407fa7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
mov edi, dword [ecx]
mov esi, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edi
mov edi, edi
test esi, esi
je 0x407fc8
cmp esi, eax
je 0x407fcd
call fcn.0053123f
cmp edi, dword [esp + 0x20]
je 0x408168
test esi, esi
jne 0x407fe0
call fcn.0053123f
cmp edi, dword [esi + 4]
jne 0x407fea
call fcn.0053123f
mov esi, dword [edi + 0x10]
test esi, esi
je 0x408032
mov ecx, dword [ebx + 0x58]
push 0x40
lea edi, [ebx + 0x18]
lea edx, [esi + 4]
push edi
push edx
mov dword [esi + 0x1f0], ecx
call fcn.00531840
mov eax, dword [esi]
add esp, 0xc
push esi
push eax
call fcn.0041fc60
mov ecx, eax
call fcn.0041cab0
call fcn.0041fc60
mov ecx, dword [esi]
push 0
push ecx
push edi
lea ecx, [eax + 0x490]
call fcn.004b33e0
lea ecx, [esp + 0x28]
call fcn.0044b9f0
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
jmp 0x407fc0
cmp dword [eax + 0x59c], 0
je 0x40817e
call fcn.0041fc60
lea ecx, [eax + 0x490]
call fcn.004b3090
test eax, eax
mov dword [esp + 0x1c], eax
je 0x408168
jmp 0x408080
mov edx, dword [esp + 0x1c]
cmp dword [edx + 0x58], 0
jne 0x40814c
call fcn.0041fc60
mov ecx, dword [eax + 0x594]
lea edx, [ecx + 1]
mov dword [eax + 0x594], edx
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x58], ecx
call fcn.0041fc60
cmp dword [eax + 0xfd4], 0
lea ebx, [eax + 0xfcc]
jbe 0x40814c
mov eax, dword [ebx + 4]
mov edi, dword [eax]
mov esi, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edi
test esi, esi
je 0x4080dc
cmp esi, ebx
je 0x4080e1
call fcn.0053123f
cmp edi, dword [esp + 0x20]
je 0x40813a
test esi, esi
jne 0x4080f0
call fcn.0053123f
cmp edi, dword [esi + 4]
jne 0x4080fa
call fcn.0053123f
mov eax, dword [edi + 0x10]
test eax, eax
je 0x408127
cmp dword [eax + 0x1f0], 0
jne 0x408127
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x58]
push eax
mov dword [eax + 0x1f0], edx
mov eax, dword [eax]
push eax
call fcn.0041fc60
mov ecx, eax
call fcn.0041cab0
lea ecx, [esp + 0x28]
call fcn.0044b9f0
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
jmp 0x4080d4
call fcn.0041fc60
push 0
lea ecx, [eax + 0x490]
call fcn.004b3270
call fcn.0041fc60
lea ecx, [eax + 0x490]
call fcn.004b3100
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x408080
call fcn.0041fc60
push 0
lea ecx, [eax + 0x490]
call fcn.004b3270
mov edi, dword [esp + 0x30]
push str.XML_
call fcn.00406b70
add eax, 4
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00402100
push str.VideoColor.xml
push eax
lea edx, [esp + 0x34]
push edx
mov byte [esp + 0x9fee8], 0x10
call fcn.00402100
add esp, 0x18
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x9fed4], 0x11
call fcn.00402060
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4081eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x9fed0], 0xd
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408213
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x14]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x408235
push 0
lea ecx, [esp + 0x18]
call fcn.00401650
mov esi, dword [esp + 0x14]
call fcn.0041fc60
push esi
lea ecx, [eax + 0x5b4]
call fcn.004af7a0
call fcn.004bcea0
push 0
lea ecx, [esp + 0x48]
call fcn.00486130
mov bl, 0x12
lea ecx, [esp + 0x44]
mov byte [esp + 0x9fed0], bl
call fcn.005104b7
cmp eax, 1
jne 0x4082a5
push 0
lea ecx, [esp + 0x1fa0]
call fcn.0040bbb0
lea ecx, [esp + 0x1f9c]
mov byte [esp + 0x9fed0], 0x13
mov dword [edi + 0x20], ecx
call fcn.005104b7
lea ecx, [esp + 0x1f9c]
mov byte [esp + 0x9fed0], bl
call fcn.004073b0
lea ecx, [esp + 0x44]
mov byte [esp + 0x9fed0], 0xd
call fcn.004862d0
mov byte [esp + 0x9fed0], 2
lea eax, [esi - 0x10]
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4082da
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x9fed0], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408302
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x34]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x9fed0], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408326
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x9fec8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x9feb0]
xor ecx, esp
call fcn.0053042b
mov esp, ebp
pop ebp
ret