Function at 0x427230
Capabilities:
Allocate thread local storage
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x664
push ebx
mov ebx, ecx
mov dword [esp + 4], 0
push esi
push edi
mov dword [esp + 0x18], ebx
mov edi, 1
cmp byte [ebx + 0x24], 0
mov dword [ebx], 0x472fd0
je 0x42729e
mov ecx, 0x47adfc
mov dword [esp + 0x34], 0xffffffff
call fcn.0041a210
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [0x47ae18], 0
mov eax, 4
cmovne eax, edi
sub dword [0x47ae28], edi
jne 0x427297
push eax
call dword [sym.imp.WINMM.dll_timeEndPeriod]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor esi, esi
mov ecx, ebx
call fcn.00428790
cmp dword [ebx + 0x1c], 0
jne 0x4272bf
mov ecx, dword [ebx + 0xcc]
lea eax, [ebx + 0xc]
push eax
call fcn.0042c710
add dword [ebx + 0x20], eax
mov ecx, ebx
call fcn.00428790
test al, al
je 0x4272d0
inc esi
cmp esi, 0x64
jl 0x4272a0
mov eax, dword [ebx + 0x5c]
or ecx, 0xffffffff
sub eax, dword [ebx + 0x58]
test eax, 0xfffffffc
je 0x42763f
mov eax, dword [ebx + 0x54]
lea esi, [ebx + 0x54]
test eax, eax
je 0x4272f5
mov eax, dword [eax]
cmp eax, 1
jne 0x427334
push 8
call fcn.0044783a
add esp, 4
mov ecx, edi
mov dword [eax], 0
mov byte [eax + 5], 1
lock xadd dword [eax], ecx
mov ecx, dword [esi]
mov dword [esi], eax
test ecx, ecx
je 0x427331
or eax, 0xffffffff
lock xadd dword [ecx], eax
sub eax, 1
setne al
test al, al
jne 0x427331
push ecx
call fcn.0044786d
add esp, 4
or ecx, 0xffffffff
mov edi, dword [esi]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x38], edi
test edi, edi
je 0x42734b
mov eax, 1
lock xadd dword [edi], eax
mov dword [esp + 0x24], edi
test edi, edi
je 0x42735c
mov eax, 1
lock xadd dword [edi], eax
mov dword [esp + 0x28], esi
test edi, edi
je 0x42737d
mov eax, ecx
lock xadd dword [edi], eax
sub eax, 1
setne al
test al, al
jne 0x42737d
push edi
call fcn.0044786d
add esp, 4
xor esi, esi
lea eax, [ebx + 0x54]
mov dword [esp + 0x2c], esi
cmp dword [eax + 0x14], esi
jne 0x427390
or ecx, 0xffffffff
jmp 0x427399
mov ecx, dword [eax + 8]
sub ecx, dword [eax + 4]
sar ecx, 2
mov dword [esp + 0x30], ecx
mov dword [esp + 0x10], ecx
test edi, edi
je 0x4273ab
cmp byte [edi + 5], 0
jne 0x4273ad
xor eax, eax
inc dword [eax + 0x10]
test edi, edi
je 0x42763f
mov ecx, dword [esp + 0xc]
test cl, 0x40
je 0x4273d5
and ecx, 0xffffffbf
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x40]
call fcn.00402420
mov ecx, dword [esp + 0xc]
cmp byte [edi + 5], 0
je 0x427466
test cl, cl
jns 0x4273fd
and ecx, 0xffffff7f
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0xf0]
call fcn.00402420
mov ecx, dword [esp + 0xc]
test ecx, 0x200
je 0x42741f
and ecx, 0xfffffdff
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x1a0]
call fcn.00402420
mov ecx, dword [esp + 0xc]
xor eax, eax
lea edx, [ebx + 0x54]
cmp byte [edi + 5], al
cmovne eax, edx
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
sub eax, edx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x10]
sar eax, 2
cmp eax, edx
mov dword [esp + 0x3c], eax
cmovb edx, eax
cmp esi, edx
jae 0x427466
mov eax, dword [esp + 0x14]
lea eax, [eax + esi*4]
cmp dword [eax], 0
jne 0x427561
inc esi
add eax, 4
mov dword [esp + 0x2c], esi
cmp esi, edx
jb 0x427451
test edi, edi
je 0x42763f
test ecx, 0x400
je 0x427490
and ecx, 0xfffffbff
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x250]
call fcn.00402420
mov ecx, dword [esp + 0xc]
cmp byte [edi + 5], 0
je 0x427625
test ecx, 0x800
je 0x4274bc
and ecx, 0xfffff7ff
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x300]
call fcn.00402420
mov ecx, dword [esp + 0xc]
test ecx, 0x2000
je 0x4274de
and ecx, 0xffffdfff
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x3b0]
call fcn.00402420
mov ecx, dword [esp + 0xc]
xor eax, eax
lea esi, [ebx + 0x54]
cmp byte [edi + 5], al
cmovne eax, esi
add dword [eax + 0x10], 0xffffffff
jne 0x427625
test ecx, 0x4000
je 0x427515
and ecx, 0xffffbfff
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x460]
call fcn.00402420
mov ecx, dword [esp + 0xc]
test ecx, 0x10000
je 0x427533
and ecx, 0xfffeffff
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x510]
call fcn.00402420
xor ecx, ecx
cmp byte [edi + 5], cl
cmovne ecx, esi
mov dword [esp + 0x14], ecx
mov eax, dword [ecx + 8]
mov esi, dword [ecx + 4]
cmp esi, eax
je 0x4275e4
nop dword [eax]
cmp dword [esi], 0
je 0x42759d
add esi, 4
cmp esi, eax
jne 0x427550
jmp 0x4275e4
cmp esi, edx
jae 0x427466
mov edx, dword [esp + 0x14]
mov eax, esi
inc esi
mov dword [esp + 0x2c], esi
mov eax, dword [edx + eax*4]
test eax, eax
je 0x427466
mov ecx, dword [eax]
mov edx, dword [ecx]
mov ecx, eax
cmp edx, 0x42d100
jne 0x427a13
mov eax, dword [eax]
push 1
call dword [eax + 4]
jmp 0x4273b0
cmp esi, eax
je 0x4275e4
lea ecx, [esi + 4]
mov ebx, eax
sub ebx, ecx
xor edx, edx
add ebx, 3
shr ebx, 2
cmp ecx, eax
cmova ebx, edx
mov dword [esp + 0x10], ebx
test ebx, ebx
mov ebx, dword [esp + 0x18]
je 0x4275e0
mov edi, dword [esp + 0x10]
mov ebx, dword [ecx]
test ebx, ebx
je 0x4275d0
mov dword [esi], ebx
add esi, 4
inc edx
add ecx, 4
cmp edx, edi
jne 0x4275c5
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 4]
mov dword [esp + 0x20], esi
cmp esi, edx
jne 0x4275f9
cmp eax, dword [ecx + 8]
jne 0x4275f9
mov dword [ecx + 8], edx
jmp 0x427625
cmp esi, eax
je 0x427625
mov ecx, dword [ecx + 8]
sub ecx, eax
sar ecx, 2
lea ebx, [ecx*4]
push ebx
push eax
push esi
call fcn.00449a40
mov ecx, dword [esp + 0x20]
lea eax, [esi + ebx]
mov ebx, dword [esp + 0x24]
add esp, 0xc
mov dword [ecx + 8], eax
or eax, 0xffffffff
lock xadd dword [edi], eax
sub eax, 1
setne al
test al, al
jne 0x42763f
push edi
call fcn.0044786d
add esp, 4
mov esi, dword [ebx + 0xd8]
mov dword [ebx + 0xd8], 0
test esi, esi
je 0x427663
mov ecx, esi
call fcn.00431c30
push esi
call fcn.0044786d
add esp, 4
mov edi, dword [ebx + 0xcc]
lea esi, [edi + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
mov dword [edi + 0x38], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebx + 0xcc]
or edi, 0xffffffff
mov dword [ebx + 0xcc], 0
test ecx, ecx
je 0x4276ba
add ecx, 4
mov eax, edi
lock xadd dword [ecx], eax
sub eax, 1
setne al
test al, al
jne 0x4276ba
test ecx, ecx
je 0x4276ba
add ecx, 0xfffffffc
je 0x4276ba
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [ebx + 0xd0]
mov dword [ebx + 0xd0], 0
test ecx, ecx
je 0x427701
add ecx, 4
mov eax, edi
lock xadd dword [ecx], eax
sub eax, 1
setne al
test al, al
jne 0x427701
test ecx, ecx
je 0x4276ea
add ecx, 0xfffffffc
jmp 0x4276ec
xor ecx, ecx
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x4731e8
jne 0x427a1a
push 1
call dword [eax + 8]
mov ecx, dword [ebx + 0xd4]
mov dword [ebx + 0xd4], 0
test ecx, ecx
je 0x427748
add ecx, 4
mov eax, edi
lock xadd dword [ecx], eax
sub eax, 1
setne al
test al, al
jne 0x427748
test ecx, ecx
je 0x427731
add ecx, 0xfffffffc
jmp 0x427733
xor ecx, ecx
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x4731e8
jne 0x427a21
push 1
call dword [eax + 8]
mov eax, dword [0x47bd74]
test eax, 0xfffffffe
jne 0x4277d8
mov edx, 0x47bd74
xor eax, eax
mov ecx, 1
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x427790
mov eax, dword [0x47bd74]
cmp eax, 1
jne 0x4277d8
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
nop dword [eax]
push 0
call esi
mov eax, dword [0x47bd74]
cmp eax, 1
je 0x427780
jmp 0x4277d8
mov dword [0x47bd78], 0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x47bd78], eax
cmp eax, 0xffffffff
jne 0x4277b8
cmp byte [0x47bce8], 0
jne 0x427a28
int3
test dword [esp + 0xc], 0x20000
je 0x4277ce
lea ecx, [esp + 0x5c0]
call fcn.00402420
mov dword [0x47bd74], 0x47bd78
mov eax, dword [0x47bd74]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
jne 0x4277fb
push 0
push ecx
call fcn.00429420
add esp, 4
mov ecx, eax
call fcn.00429490
mov esi, dword [ebx + 0xd8]
mov dword [ebx + 0xd8], 0
test esi, esi
je 0x42781f
mov ecx, esi
call fcn.00431c30
push esi
call fcn.0044786d
add esp, 4
mov ecx, dword [ebx + 0xd4]
test ecx, ecx
je 0x42785c
add ecx, 4
mov eax, edi
lock xadd dword [ecx], eax
sub eax, 1
setne al
test al, al
jne 0x42785c
test ecx, ecx
je 0x427845
add ecx, 0xfffffffc
jmp 0x427847
xor ecx, ecx
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x4731e8
jne 0x427a2f
push 1
call dword [eax + 8]
mov ecx, dword [ebx + 0xd0]
test ecx, ecx
je 0x427899
add ecx, 4
mov eax, edi
lock xadd dword [ecx], eax
sub eax, 1
setne al
test al, al
jne 0x427899
test ecx, ecx
je 0x427882
add ecx, 0xfffffffc
jmp 0x427884
xor ecx, ecx
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x4731e8
jne 0x427a36
push 1
call dword [eax + 8]
mov ecx, dword [ebx + 0xcc]
test ecx, ecx
je 0x4278c5
add ecx, 4
mov eax, edi
lock xadd dword [ecx], eax
sub eax, 1
setne al
test al, al
jne 0x4278c5
test ecx, ecx
je 0x4278c5
add ecx, 0xfffffffc
je 0x4278c5
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [ebx + 0xb4]
lea esi, [ebx + 0xb0]
test ecx, ecx
je 0x4278f9
mov eax, dword [esi + 0xc]
sub eax, ecx
sar eax, 2
push eax
push ecx
call fcn.00408460
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov ecx, esi
call fcn.0042c920
mov eax, dword [ebx + 0xa4]
lea esi, [ebx + 0x90]
cmp eax, 0x10
jb 0x42791c
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.00405260
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov byte [esi], 0
mov eax, dword [ebx + 0x8c]
cmp eax, 0x10
jb 0x427945
inc eax
lea ecx, [ebx + 0x78]
push eax
push dword [ebx + 0x78]
call fcn.00405260
mov dword [ebx + 0x8c], 0xf
mov dword [ebx + 0x88], 0
mov byte [ebx + 0x78], 0
mov ecx, dword [ebx + 0x70]
test ecx, ecx
je 0x42797b
lock xadd dword [ecx], edi
sub edi, 1
setne al
test al, al
jne 0x42797b
mov eax, dword [ecx + 4]
push ecx
call eax
add esp, 4
mov ecx, dword [ebx + 0x58]
test ecx, ecx
je 0x4279a6
mov eax, dword [ebx + 0x60]
sub eax, ecx
sar eax, 2
push eax
push ecx
call fcn.00408460
mov dword [ebx + 0x58], 0
mov dword [ebx + 0x5c], 0
mov dword [ebx + 0x60], 0
lea ecx, [ebx + 0x54]
call fcn.0042c920
lea ecx, [ebx + 0x40]
call fcn.004295f0
push 8
push 1
push dword [ebx + 0x40]
call fcn.00401480
add esp, 0xc
mov dword [ebx + 0x40], 0
lea ecx, [ebx + 0x28]
call fcn.00427a70
lea ecx, [ebx + 0xc]
call fcn.004295f0
push 8
push 1
push dword [ebx + 0xc]
call fcn.00401480
mov dword [ebx + 0xc], 0
add esp, 0xc
mov ecx, dword [ebx + 4]
mov dword [ebx + 4], 0
test ecx, ecx
je 0x427a06
mov eax, dword [ecx]
push 1
call dword [eax]
pop edi
pop esi
mov dword [ebx], 0x472fb8
pop ebx
mov esp, ebp
pop ebp
ret
call edx
jmp 0x4273b0
call edx
jmp 0x427701
call edx
jmp 0x427748
push 1
call fcn.00453ee2
call edx
jmp 0x42785c
call edx
jmp 0x427899