Function at 0x59f540
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xd0
call fcn.005b6790
mov edi, eax
test eax, eax
je 0x59fb21
mov dword [esp + 0x28], edi
lock dec byte [edi + 0x18]
je 0x59fb07
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
add edi, 0x18
mov dword [esp], eax
mov esi, dword [0x7151a8]
test esi, esi
je 0x59f5ff
mov dword [esp + 0x1c], edi
mov edi, 0x3e8
mov eax, ecx
mul edi
mov edx, ebx
mov ebx, eax
mov eax, edx
seto cl
mul edi
mov edi, edx
add edi, ebx
mov ebx, eax
setb al
or al, cl
jne 0x59f5e2
mov eax, dword [ebp + 0x10]
mov ecx, 0x431bde83
mul ecx
shr edx, 0x12
add ebx, edx
adc edi, 0
jb 0x59f5e2
imul eax, edx, 0xf4240
xor ecx, ecx
sub dword [esp], eax
setne cl
xor eax, eax
add ebx, ecx
adc edi, 0
setb cl
neg edi
sbb eax, eax
test cl, cl
je 0x59f876
mov eax, 0xffffffff
mov edi, dword [esp + 0x1c]
push eax
push 1
push 0x6e15bf
push edi
call esi
xor eax, eax
xchg byte [edi], al
jmp 0x59fb07
mov ecx, dword [0x714d5c]
cmp ecx, 0xffffffff
jne 0x59f64c
mov dword [esp + 0x3c], 0xffffffff
mov eax, dword [0x714d6c]
lea ecx, [esp + 0x3c]
push 0
push 0
push 0xc0000000
push ecx
call eax
test eax, eax
jne 0x59fb37
mov ecx, dword [esp + 0x3c]
mov eax, 0xffffffff
lock cmpxchg dword [0x714d5c], ecx
je 0x59f64c
mov esi, eax
push ecx
call sub.KERNEL32.dll_CloseHandle
mov ecx, esi
mov esi, 0x3b9aca00
mov eax, ebx
mov dword [esp + 0x50], ecx
mul esi
mov ebx, eax
mov eax, dword [ebp + 0xc]
mov ecx, edx
mul esi
mov esi, ebx
add eax, ecx
mov ecx, 0xffffff9c
adc edx, 0
add esi, dword [ebp + 0x10]
adc eax, 0
mov dword [esp + 0x4c], esi
adc edx, 0
setb bl
cmp ecx, esi
mov ecx, 0xffffffff
sbb ecx, eax
mov ecx, 0x31
movzx ebx, bl
sbb ecx, edx
mov ecx, 0
sbb ecx, ebx
jb 0x59f86f
mov ecx, esi
mov esi, eax
mov dword [esp + 0x1c], edi
mov edi, edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], edx
add ecx, 0x63
adc esi, 0
mov eax, ecx
mov dword [esp], ecx
adc edi, 0
mov ecx, esi
mov dword [esp + 4], esi
adc ebx, 0
or eax, edi
mov dword [esp + 0x10], edi
or ecx, ebx
mov dword [esp + 0x14], ebx
or eax, ecx
mov eax, dword [esp + 4]
sete byte [esp + 0xc]
bsr edx, edi
bsr esi, ebx
xor edx, 0x1f
xor esi, 0x1f
add edx, 0x20
test ebx, ebx
cmovne edx, esi
bsr esi, dword [esp]
bsr ecx, eax
xor ecx, 0x1f
xor esi, 0x1f
add esi, 0x20
test eax, eax
cmovne esi, ecx
mov ecx, edi
mov edi, 0
add esi, 0x40
or ecx, ebx
mov ebx, 0x79
mov ecx, 0x7f
cmovne esi, edx
mov edx, 0
sub ebx, esi
mov esi, 0
sbb edi, edi
sbb edx, edx
sbb esi, esi
cmp ecx, ebx
mov ecx, 0
sbb ecx, edi
mov ecx, 0
mov dword [esp + 0x18], esi
sbb ecx, edx
mov ecx, 0
sbb ecx, esi
mov esi, 0
setb cl
or cl, byte [esp + 0xc]
mov ecx, eax
mov eax, 0
cmovne ecx, esi
mov esi, dword [esp]
mov dword [esp + 0xc], ecx
cmovne esi, eax
mov dword [esp + 8], esi
jne 0x59fa92
mov esi, edi
mov ecx, ebx
mov eax, edx
or esi, dword [esp + 0x18]
xor ecx, 0x7f
or ecx, edx
or esi, ecx
je 0x59fa92
mov dword [esp + 0x20], eax
mov eax, dword [esp]
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 4]
mov dword [esp + 0xc0], eax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc4], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0xb8], 0
mov dword [esp + 0xb4], 0
mov dword [esp + 0xb0], 0
mov dword [esp + 0xac], 0
mov dword [esp + 0xc8], ecx
mov ecx, ebx
xor cl, 0x7f
mov ch, cl
shr cl, 3
and cl, 0xf
and ch, 7
neg cl
movsx edx, cl
mov cl, ch
mov eax, dword [esp + edx + 0xc4]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + edx + 0xc8]
shld ebx, eax, cl
shl eax, cl
not cl
mov dword [esp + 0x38], ebx
mov dword [esp + 0x2c], eax
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + edx + 0xc0]
mov esi, dword [esp + edx + 0xbc]
mov edx, eax
shr edx, 1
shr edx, cl
mov cl, ch
shld eax, esi, cl
shl esi, cl
add ebx, 1
adc edi, 0
mov dword [esp + 0xc], eax
mov dword [esp + 0x30], edi
adc dword [esp + 0x20], 0
mov edi, dword [esp + 0x18]
adc edi, 0
jae 0x59f87d
mov dword [esp + 0x10], 0
xor edi, edi
jmp 0x59fa7a
mov ecx, ebx
jmp 0x59faa2
or eax, ebx
jmp 0x59f5e7
mov eax, dword [esp]
or dword [esp + 0x2c], edx
mov ch, bl
and ch, 7
mov cl, ch
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xa8], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x98], eax
mov eax, ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x24], ebx
shr al, 3
and al, 0xf
movzx edx, al
mov eax, esi
mov edi, dword [esp + edx + 0x94]
mov ebx, dword [esp + edx + 0x98]
mov esi, edi
add edi, edi
shrd esi, ebx, cl
mov dword [esp], esi
mov esi, dword [esp + edx + 0x90]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
shr esi, cl
not cl
shl edi, cl
mov cl, ch
or edi, esi
shr ebx, cl
mov esi, dword [esp + 8]
mov dword [esp + 0x14], edi
mov edi, dword [esp + 4]
mov eax, ebx
mov ebx, 0x64
mov edx, dword [esp + edx + 0x8c]
mov dword [esp + 0x10], 0
shrd edx, edi, cl
add ebx, 0xffffffff
mov dword [esp + 0x34], edx
mov edx, 0
mov dword [esp + 0x60], ebx
mov ebx, 0
adc edx, 0xffffffff
mov dword [esp + 0x5c], edx
adc ebx, 0xffffffff
mov edx, 0
adc edx, 0xffffffff
mov dword [esp + 0x58], ebx
mov ebx, dword [esp + 0x20]
xor edi, edi
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x30]
nop word cs:[eax + eax]
nop
mov dword [esp + 0x20], ebx
mov ecx, dword [esp]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x10], 0
shld eax, ecx, 1
shld ecx, ebx, 1
shld ebx, edx, 1
mov dword [esp + 4], eax
mov dword [esp], ecx
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x2c]
shld edx, eax, 1
shld eax, ecx, 1
or eax, edi
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xc]
shld ecx, eax, 1
shld eax, esi, 1
add esi, esi
or ecx, edi
or esi, dword [esp + 8]
or eax, edi
cmp dword [esp + 0x60], edx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 4]
mov dword [esp + 8], esi
mov esi, 0x64
sbb ecx, ebx
mov ecx, dword [esp + 0x58]
sbb ecx, dword [esp]
mov ecx, dword [esp + 0x54]
sbb ecx, eax
sar ecx, 0x1f
mov edi, ecx
and ecx, esi
mov esi, dword [esp + 0x24]
and edi, 1
sub edx, ecx
sbb ebx, 0
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x30]
sbb dword [esp], 0
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x20]
sbb eax, 0
add esi, 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
adc edx, 0xffffffff
mov dword [esp + 0x24], esi
adc ebx, 0xffffffff
mov ecx, edx
adc eax, 0xffffffff
or esi, ebx
or ecx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 4]
or esi, ecx
mov esi, dword [esp + 8]
jne 0x59f990
mov eax, dword [esp + 0xc]
shld eax, esi, 1
add esi, esi
or eax, dword [esp + 0x10]
or esi, edi
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov esi, dword [esp + 8]
mov ebx, 0
neg esi
sbb ebx, dword [esp + 0xc]
cmp dword [esp + 0x4c], 0xffffff9d
sbb eax, 0xffffffff
mov eax, 0
sbb edx, 0x31
sbb ecx, 0
mov ecx, 0x80000000
cmovb ecx, ebx
cmovae esi, eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x68], esi
mov eax, dword [0x714d74]
lea ecx, [esp + 0x68]
push ecx
push 0
push edi
mov esi, dword [esp + 0x5c]
push esi
call eax
test eax, eax
mov eax, 0
xchg byte [edi], al
je 0x59fb07
cmp al, 1
jne 0x59fb07
mov eax, dword [0x714d74]
push 0
push 0
push edi
push esi
call eax
mov eax, dword [esp + 0x28]
lock dec dword [eax]
jne 0x59fb19
lea ecx, [esp + 0x28]
call fcn.00589210
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x6e25e8
push 0x5e
push str.use_of_std::thread::current___is_not_possible_after_the_threads_local_data_has_been_destroyed
call fcn.004fa840
add esp, 0xc
jmp 0x59fba9
mov dword [esp + 0x64], eax
lea eax, [esp + 0x64]
mov dword [esp + 0x68], 0x6e54e0
mov dword [esp + 0x6c], 1
mov dword [esp + 0x78], 0
mov dword [esp + 0x84], eax
lea eax, [esp + 0x84]
mov dword [esp + 0x88], fcn.00509570
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], 1
lea eax, [esp + 0x68]
push 0x6e5518
push eax
call fcn.004faa60
add esp, 8
jmp 0x59fba9
ud2