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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x90
mov esi, esp
mov dword [esi + 0x78], ebp
mov dword [esi + 0x7c], esp
mov dword [esi + 0x88], 0xffffffff
mov dword [esi + 0x84], 0x10048720
mov ebx, dword [ebp + 8]
lea eax, [esi + 0x80]
mov ecx, dword fs:[0]
mov dword [esi + 0x80], ecx
mov dword fs:[0], eax
cmp byte [ebx + 0x11], 0
je 0x100416a3
mov byte [esi + 6], 3
jmp 0x100416c5
xor ecx, ecx
call fcn.10047e10
test eax, eax
je 0x10041a1f
cmp dword [eax], 1
jbe 0x100416bd
mov byte [esi + 6], 1
jmp 0x100416c5
call fcn.1003d960
mov byte [esi + 6], al
mov eax, dword [ebx + 0xc]
mov edi, dword [ebx]
mov ebx, dword [ebx + 4]
mov dword [esi + 0x34], eax
lea eax, [esi + 0x68]
push edi
push eax
call dword [ebx + 0xc]
add esp, 8
mov eax, 0xb98b1b71
mov ecx, 0x57a64178
xor eax, dword [esi + 0x6c]
xor ecx, dword [esi + 0x68]
or ecx, eax
jne 0x1004170c
mov ecx, dword [esi + 0x70]
mov edx, dword [esi + 0x74]
mov eax, 4
xor ecx, 0xd6cb5d6d
xor edx, 0x63eb502c
or edx, ecx
mov ecx, edi
je 0x10041753
lea eax, [esi + 0x58]
push edi
push eax
call dword [ebx + 0xc]
add esp, 8
mov eax, 0x2e766937
mov ecx, 0xa5d5dddf
xor eax, dword [esi + 0x5c]
xor ecx, dword [esi + 0x58]
or ecx, eax
mov eax, 0xc
mov ecx, 0x1006ef50
jne 0x10041758
mov edx, dword [esi + 0x60]
mov ebx, dword [esi + 0x64]
xor edx, 0x30dbe68c
xor ebx, 0x837b9c3
or ebx, edx
jne 0x10041758
lea ecx, [edi + 4]
mov eax, 8
mov ecx, dword [ecx]
mov eax, dword [edi + eax]
mov dword [esi + 0x48], ecx
xor ecx, ecx
mov dword [esi + 0x4c], eax
xor edi, edi
call fcn.100481f0
test eax, eax
je 0x1004179a
mov ecx, dword [eax]
test ecx, ecx
je 0x100419f9
lock inc dword [ecx]
jle 0x10041a0f
test ecx, ecx
je 0x1004179a
mov dword [esi + 0xc], ecx
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x100417ad
cmp eax, 1
jne 0x100417b9
mov eax, dword [ecx + 0x18]
mov edx, dword [ecx + 0x14]
dec eax
jmp 0x100417c3
mov dword [esi + 0xc], 0
mov eax, 9
mov edx, 0x1006ef5c
jmp 0x100417c5
mov eax, 4
mov edx, str.main
jmp 0x100417c3
mov eax, 9
mov edx, 0x1006ef5c
mov edi, ecx
mov dword [esi + 0x50], edx
mov dword [esi + 0x54], eax
lea eax, [esi + 0x50]
mov dword [esi + 8], edi
mov dword [esi + 0x38], eax
lea eax, [esi + 0x34]
mov dword [esi + 0x3c], eax
lea eax, [esi + 0x48]
mov dword [esi + 0x40], eax
lea eax, [esi + 6]
mov dword [esi + 0x44], eax
movzx eax, byte [0x1008c86d]
test al, al
je 0x10041875
xor ecx, ecx
mov byte [0x1008c86d], 1
mov dword [esi + 0x88], 0
call fcn.10048030
test eax, eax
je 0x10041879
mov ebx, dword [eax]
mov dword [eax], 0
lea eax, [esi + 0x14]
mov dword [esi + 0x10], 0
test ebx, ebx
mov dword [esi + 0x14], ebx
je 0x10041895
mov dword [esi + 0x30], eax
mov dword [esi + 0x24], ebx
mov cl, 1
xor eax, eax
lea edi, [ebx + 8]
lock cmpxchg byte [ebx + 8], cl
jne 0x10041a11
mov dword [esi + 8], edi
mov eax, dword [0x1008c8cc]
mov dword [esi + 0x2c], ebx
test eax, 0x7fffffff
je 0x100418d9
mov byte [esi + 5], 1
mov dword [esi + 0x88], 2
call fcn.1005e580
mov ebx, dword [esi + 0x2c]
xor al, 1
mov dword [esi + 0x20], eax
jmp 0x100418e0
xor eax, eax
jmp 0x1004187e
mov eax, 1
mov dword [esi + 0x10], eax
lea eax, [esi + 0x14]
mov dword [esi + 0x14], 0
mov dword [esi + 0x88], 1
mov dword [esi + 0x18], 0
mov byte [esi + 0x1c], 0
mov byte [esi + 7], 1
mov dword [esi + 0x30], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x88], 1
lea ecx, [esi + 0x38]
lea edx, [esi + 0x18]
push 0x1006ef90
call fcn.10041b70
add esp, 4
mov eax, dword [esi + 8]
xor ebx, ebx
test eax, eax
jne 0x100419b3
jmp 0x100419c0
mov dword [esi + 0x20], 0
movzx eax, byte [ebx + 9]
lea edx, [ebx + 0xc]
mov dword [esi + 0x88], 4
lea ecx, [esi + 0x38]
push 0x1006ef68
call fcn.10041b70
add esp, 4
cmp byte [esi + 0x20], 0
je 0x10041967
mov ecx, dword [esi + 8]
xor eax, eax
xchg byte [ecx], al
cmp al, 2
jne 0x10041923
push ecx
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
mov dword [esi + 0x88], 3
mov eax, dword [esi + 0x24]
xor ecx, ecx
mov byte [0x1008c86d], 1
mov dword [esi + 0x88], 3
mov dword [esi + 8], eax
mov dword [esi + 0x18], eax
call fcn.10048030
test eax, eax
je 0x1004199a
mov ecx, dword [eax]
mov edx, dword [esi + 8]
test ecx, ecx
mov dword [eax], edx
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x18], 1
je 0x100419aa
lock dec dword [ecx]
jne 0x100419aa
lea ecx, [esi + 0x1c]
jmp 0x100419a5
mov eax, dword [0x1008c8cc]
test eax, 0x7fffffff
je 0x10041907
mov byte [esi + 5], 1
mov dword [esi + 0x88], 2
call fcn.1005e580
test al, al
jne 0x10041907
mov eax, dword [esi + 0x2c]
mov byte [eax + 9], 1
jmp 0x10041907
mov eax, dword [esi + 8]
lock dec dword [eax]
jne 0x100419aa
lea ecx, [esi + 0x18]
call fcn.100381c0
mov eax, dword [esi + 0xc]
mov bl, 1
test eax, eax
je 0x100419c0
lock dec dword [eax]
jne 0x100419c0
lea ecx, [esi + 0xc]
call fcn.10038180
cmp dword [esi + 0x10], 0
mov eax, dword [esi + 0x14]
setne cl
test eax, eax
sete dl
or cl, bl
or cl, dl
cmp cl, 1
je 0x100419e5
lock dec dword [eax]
jne 0x100419e5
mov ecx, dword [esi + 0x30]
call fcn.100381c0
mov eax, dword [esi + 0x80]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, eax
mov edi, eax
call fcn.1005e0e0
mov ecx, dword [edi]
xor edi, edi
lock inc dword [ecx]
jg 0x1004177e
ud2
push edi
call fcn.1005e7f0
add esp, 4
jmp 0x10041842
lea eax, [esi + 0x38]
push 0x1006e260
push 0x1006dec4
push eax
push 0x46
push 0x1006e1f8
call fcn.1005f2b0
nop dword [eax]
push ebp
sub esp, 0x14
lea esi, [ebp - 0x8c]
mov ebp, dword [esi + 0x78]
cmp dword [esi + 8], 0
je 0x10041a63
mov eax, dword [esi + 8]
lock dec dword [eax]
jne 0x10041a63
lea ecx, [esi + 0xc]
call fcn.10038180
add esp, 0x14
pop ebp
ret