Function at 0x402ae0
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
lea eax, [esp + 0x20]
push 0x8000
lea ebp, [esi + 0x58]
push eax
mov ecx, ebp
mov dword [esp + 0x30], esi
call fcn.005111f0
mov ecx, dword [eax]
mov eax, dword [esp + 0x20]
mov edx, dword [ecx - 8]
mov ecx, dword [0x547574]
cmp edx, 2
lea edx, [eax - 0xc]
setg bl
cmp edx, ecx
je 0x402b3a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x402b3a
mov eax, dword [esp + 0x20]
add eax, 0xfffffff4
push eax
call fcn.00532222
add esp, 4
test bl, bl
je 0x402d86
lea eax, [esp + 0x30]
lea ecx, [esp + 0x34]
neg eax
sbb eax, eax
and eax, ecx
test ebp, ebp
je 0x402b59
lea ecx, [esi + 0x5c]
jmp 0x402b5b
xor ecx, ecx
mov eax, dword [eax]
mov ecx, dword [ecx]
push eax
push ecx
call fcn.00511430
add esp, 8
test al, al
jne 0x402d86
lea edx, [esp + 0x24]
push edi
push edx
lea ecx, [esp + 0x38]
call fcn.00511000
mov eax, dword [0x547570]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, 0x5476d0
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x402bce
push ecx
call edi
mov esi, eax
test esi, esi
je 0x402bce
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x402bce
mov edx, dword [esp + 0x14]
inc esi
push esi
push 0x5476d0
push edx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
call fcn.00405bb0
mov eax, dword [0x547570]
mov ecx, str.ERSTELLE
test ecx, ecx
mov dword [esp + 0x10], eax
je 0x402c16
push ecx
call edi
mov esi, eax
test esi, esi
je 0x402c16
push esi
lea ecx, [esp + 0x14]
call fcn.00405530
test eax, eax
je 0x402c16
mov edx, dword [esp + 0x10]
inc esi
push esi
push str.ERSTELLE
push edx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x10]
push 0xffffffffffffffff
call fcn.00405bb0
mov eax, dword [0x547570]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
push eax
mov ecx, dword [eax - 8]
mov eax, dword [esp + 0x14]
push ecx
push eax
mov edx, dword [eax - 8]
lea ecx, [esp + 0x24]
push edx
call fcn.004059f0
lea eax, [esp + 0x18]
lea ecx, [esp + 0x24]
push eax
call fcn.00405440
lea ecx, [esp + 0x18]
call fcn.00405700
mov ecx, dword [0x547570]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
push eax
mov edx, dword [eax - 8]
mov eax, dword [esp + 0x28]
push edx
push eax
mov eax, dword [eax - 8]
lea ecx, [esp + 0x28]
push eax
call fcn.004059f0
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x24]
call fcn.00405440
lea ecx, [esp + 0x1c]
call fcn.00405700
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [esp + 0x20]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x402ccb
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x402cd1
mov edx, dword [esp + 0x20]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
jmp 0x402cd1
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [esp + 0x24]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x402cfc
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x402cfc
mov edx, dword [esp + 0x24]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x402d27
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x402d27
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x402d52
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x402d52
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
lea esi, [esp + 0x34]
lea edi, [ebp + 4]
neg esi
sbb esi, esi
lea eax, [esp + 0x38]
mov ecx, edi
and esi, eax
call fcn.00405300
push esi
mov ecx, edi
call fcn.00406370
mov ecx, dword [esp + 0x2c]
push ebp
call fcn.00402da0
lea ecx, [esp + 0x28]
call fcn.00405700
pop edi
lea ecx, [esp + 0x30]
call fcn.00510740
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 8