Function at 0x4041d0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x43b308
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
mov edx, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2c]
xor eax, eax
mov ecx, esi
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
push edi
mov dword [ecx + 0xc], eax
push edx
lea ecx, [esp + 0x34]
call fcn.004039d0
mov ebp, dword [esp + 0x30]
mov al, byte [ebp + 3]
cmp al, 0x20
mov dword [esp + 0x24], 0
je 0x404419
cmp al, 0x2c
je 0x404345
mov eax, dword [ebp - 8]
test eax, eax
jl 0x4044fd
push 0x43d9ec
push ebp
call fcn.00429a2f
add esp, 8
test eax, eax
je 0x4044fd
sub eax, ebp
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4044fd
push ecx
mov eax, esp
mov dword [esp + 0x1c], esp
push 2
lea ecx, [ebx + 2]
push ecx
push eax
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
add esp, 4
push 3
lea edx, [ebx + 5]
mov word [esi + 6], ax
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x3c]
call fcn.00403a40
mov edi, eax
call fcn.004036e0
lea ecx, [esp + 0x14]
mov word [esi + 2], ax
call fcn.00402420
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 2
lea edx, [ebx + 9]
push edx
push ecx
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
mov dword [esp + 0x1c], esp
mov word [esi], ax
mov eax, esp
push 2
lea ecx, [ebx + 0xc]
push ecx
push eax
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
mov edx, esp
mov dword [esp + 0x1c], esp
mov word [esi + 8], ax
push 2
lea eax, [ebx + 0xf]
push eax
push edx
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
mov ecx, esp
mov dword [esp + 0x1c], esp
push 2
add ebx, 0x12
push ebx
push ecx
lea ecx, [esp + 0x40]
mov word [esi + 0xa], ax
call fcn.00403a40
call fcn.00403650
mov word [esi + 0xc], ax
xor eax, eax
mov ax, word [esi]
add esp, 4
mov dx, 0x32
cmp dx, ax
sbb ecx, ecx
and ecx, 0xffffff9c
add ecx, 0x7d0
add ecx, eax
mov word [esi], cx
jmp 0x4044fd
push ecx
mov edx, esp
mov dword [esp + 0x30], esp
push 2
push 5
push edx
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
add esp, 4
push 3
mov word [esi + 6], ax
push 8
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x3c]
call fcn.00403a40
mov edi, eax
call fcn.004036e0
mov word [esi + 2], ax
mov eax, dword [esp + 0x2c]
mov edx, dword [0x447064]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4043b2
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4043b2
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff4
push eax
call fcn.0042969a
add esp, 4
push ecx
mov edx, esp
mov dword [esp + 0x1c], esp
push 4
push 0xc
push edx
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
mov dword [esp + 0x1c], esp
mov word [esi], ax
mov eax, esp
push 2
push 0x11
push eax
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
mov ecx, esp
mov dword [esp + 0x1c], esp
push 2
push 0x14
push ecx
lea ecx, [esp + 0x40]
mov word [esi + 8], ax
call fcn.00403a40
call fcn.00403650
mov edx, esp
mov dword [esp + 0x1c], esp
push 2
push 0x17
mov word [esi + 0xa], ax
push edx
jmp 0x4044e8
push ecx
mov eax, esp
mov dword [esp + 0x30], esp
push 2
push 8
push eax
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
add esp, 4
push 3
push 4
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x3c]
mov word [esi + 6], ax
call fcn.00403a40
mov edi, eax
call fcn.004036e0
mov word [esi + 2], ax
mov eax, dword [esp + 0x10]
mov ecx, dword [0x447064]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x404486
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x404486
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.0042969a
add esp, 4
push ecx
mov eax, esp
mov dword [esp + 0x1c], esp
push 4
push 0x14
push eax
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
mov ecx, esp
mov dword [esp + 0x1c], esp
push 2
push 0xb
push ecx
lea ecx, [esp + 0x40]
mov word [esi], ax
call fcn.00403a40
call fcn.00403650
mov edx, esp
mov dword [esp + 0x1c], esp
push 2
push 0xe
push edx
lea ecx, [esp + 0x40]
mov word [esi + 8], ax
call fcn.00403a40
call fcn.00403650
mov dword [esp + 0x1c], esp
mov word [esi + 0xa], ax
mov eax, esp
push 2
push 0x11
push eax
lea ecx, [esp + 0x40]
call fcn.00403a40
call fcn.00403650
add esp, 4
mov word [esi + 0xc], ax
cmp word [esi], 0
mov eax, dword [0x447064]
mov dword [esp + 0x24], 0xffffffff
je 0x404548
lea ecx, [ebp - 0xc]
cmp ecx, eax
je 0x40452e
lea esi, [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40452e
push esi
call fcn.0042969a
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
lea edx, [ebp - 0xc]
cmp edx, eax
je 0x404566
lea esi, [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x404566
push esi
call fcn.0042969a
add esp, 4
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0x18
ret 8