Function at 0x4038c0
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], 0x404f20
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 0x403913
mov byte [esi + 1], 3
jmp 0x403939
mov eax, dword [0x4261a0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
cmp dword [eax + 0x20], 1
jbe 0x403931
mov byte [esi + 1], 1
jmp 0x403939
call fcn.00402520
mov byte [esi + 1], 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 0x403980
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 0x4039c7
lea eax, [esi + 0x58]
push edi
push eax
call dword [ebx + 0xc]
add esp, 8
mov eax, 0xb43168d2
mov ecx, 0xa2df9eeb
xor eax, dword [esi + 0x5c]
xor ecx, dword [esi + 0x58]
or ecx, eax
mov eax, 0xc
mov ecx, 0x41e980
jne 0x4039cc
mov edx, dword [esi + 0x60]
mov ebx, dword [esi + 0x64]
xor edx, 0x9943eeb2
xor ebx, 0x1302f132
or ebx, edx
jne 0x4039cc
lea ecx, [edi + 4]
mov eax, 8
mov ecx, dword [ecx]
mov eax, dword [edi + eax]
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov eax, dword [0x4261a0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
movzx eax, byte [eax + 0xc]
test eax, eax
je 0x4039fa
cmp eax, 1
je 0x403a24
mov dword [esi + 8], 0
jmp 0x403a66
mov eax, dword [0x4261a0]
mov ecx, dword fs:[0x2c]
mov edi, dword [ecx + eax*4]
lea eax, [edi + 8]
push 0x405770
push eax
call fcn.0040ec20
add esp, 8
mov byte [edi + 0xc], 1
mov eax, dword [0x4261a0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov eax, dword [eax + 8]
test eax, eax
je 0x403d5f
lock inc dword [eax]
jle 0x403d88
test eax, eax
mov dword [esi + 8], eax
je 0x403a66
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x403a72
cmp ecx, 1
jne 0x403a7e
mov ecx, dword [eax + 0x14]
mov eax, dword [eax + 0x18]
dec eax
jmp 0x403a80
mov ecx, 9
mov edx, 0x41e977
jmp 0x403a92
mov ecx, 0x41eea8
mov eax, 4
jmp 0x403a80
xor ecx, ecx
test ecx, ecx
mov edx, 0x41e977
cmovne edx, ecx
mov ecx, 9
cmovne ecx, eax
lea eax, [esi + 0x40]
mov dword [esi + 0x40], edx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], eax
lea eax, [esi + 0x34]
mov dword [esi + 0x4c], eax
lea eax, [esi + 0x38]
mov dword [esi + 0x50], eax
lea eax, [esi + 1]
mov dword [esi + 0x54], eax
movzx eax, byte [0x4260e8]
test al, al
je 0x403ae2
mov byte [0x4260e8], 1
mov eax, dword [0x4261a0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
cmp dword [eax + 0x10], 0
je 0x403b00
lea eax, [eax + 0x14]
jmp 0x403b2e
xor eax, eax
mov dword [esi + 0xc], eax
lea eax, [esi + 0x10]
mov dword [esi + 0x10], 0
mov dword [esi + 0x88], 2
jmp 0x403b85
mov dword [esi + 0x88], 0
xor edx, edx
mov eax, dword [0x4261a0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
lea ecx, [eax + 0x10]
call fcn.00409520
test eax, eax
je 0x403cbc
mov edi, dword [eax]
mov dword [eax], 0
lea eax, [esi + 0x10]
mov dword [esi + 0xc], 0
test edi, edi
mov dword [esi + 0x10], edi
je 0x403b85
lea ecx, [edi + 8]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edi
mov dword [esi + 4], ecx
push ecx
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov eax, dword [0x426184]
mov dword [esi + 0x2c], edi
test eax, 0x7fffffff
je 0x403bcb
mov byte [esi], 1
mov dword [esi + 0x88], 3
call fcn.0041cb70
mov edi, dword [esi + 0x2c]
xor al, 1
mov dword [esi + 0x1c], eax
jmp 0x403bd2
mov dword [esi + 0x14], 0
mov byte [esi + 0x18], 0
mov dword [esi + 0x20], eax
mov dword [esi + 0x28], eax
mov byte [esi + 2], 1
mov dword [esi + 0x88], 2
lea ecx, [esi + 0x48]
lea edx, [esi + 0x14]
push 0x41e9b4
call fcn.00403ef0
add esp, 4
mov al, 1
xor ebx, ebx
mov ecx, dword [esi + 8]
test ecx, ecx
jne 0x403cef
jmp 0x403d19
mov dword [esi + 0x1c], 0
movzx eax, byte [edi + 0xc]
lea edx, [edi + 0x10]
mov dword [esi + 0x88], 5
lea ecx, [esi + 0x48]
push 0x41e98c
call fcn.00403ef0
add esp, 4
cmp byte [esi + 0x1c], 0
je 0x403c2f
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov edx, dword [esi + 0x24]
mov byte [0x4260e8], 1
mov dword [esi + 0x14], edx
mov eax, dword [0x4261a0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
cmp dword [eax + 0x10], 0
je 0x403c5a
lea eax, [eax + 0x14]
jmp 0x403c8a
mov eax, dword [0x426184]
test eax, 0x7fffffff
je 0x403bf9
mov byte [esi], 1
mov dword [esi + 0x88], 3
call fcn.0041cb70
test al, al
jne 0x403bf9
mov eax, dword [esi + 0x2c]
mov byte [eax + 0xc], 1
jmp 0x403bf9
mov dword [esi + 4], edx
mov dword [esi + 0x88], 4
xor edx, edx
mov eax, dword [0x4261a0]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
lea ecx, [eax + 0x10]
call fcn.00409520
mov edx, dword [esi + 4]
test eax, eax
je 0x403cc6
mov ecx, dword [eax]
mov dword [eax], edx
test ecx, ecx
mov dword [esi + 0x18], ecx
mov dword [esi + 0x14], 1
je 0x403ce4
lock dec dword [ecx]
jne 0x403ce4
lea eax, [esi + 0x18]
mov byte [esi], 0
mov dword [esi + 0x88], 3
push eax
call fcn.00405120
add esp, 4
jmp 0x403ce4
mov eax, 1
jmp 0x403ae4
lock dec dword [edx]
jne 0x403ce4
lea eax, [esi + 0x14]
mov byte [esi], 0
mov dword [esi + 0x88], 3
push eax
call fcn.00405120
add esp, 4
mov bl, 1
xor eax, eax
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x403d19
lock dec dword [ecx]
jne 0x403d19
mov ecx, dword [esi + 0x20]
mov byte [esi + 3], al
lea eax, [esi + 8]
mov dword [esi + 0x88], 1
mov dword [esi + 0x30], ecx
push eax
mov dword [esi + 4], ebx
call fcn.00405160
mov ebx, dword [esi + 4]
add esp, 4
cmp dword [esi + 0xc], 0
mov eax, dword [esi + 0x10]
setne cl
test eax, eax
sete dl
or bl, cl
or bl, dl
cmp bl, 1
je 0x403d4b
lock dec dword [eax]
jne 0x403d4b
mov dword [esi + 0x88], 0xffffffff
push dword [esi + 0x20]
call fcn.00405120
add esp, 4
mov eax, dword [esi + 0x80]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [0x4261a0]
mov ecx, dword fs:[0x2c]
mov edi, dword [ecx + eax*4]
lea ecx, [edi + 8]
call fcn.0041c120
mov eax, dword [edi + 8]
lock inc dword [eax]
jg 0x403a4a
ud2