Function at 0x476cc0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4d09a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [0x4e30fc]
push ebx
xor ebx, ebx
push esi
mov dword [esp + 0x14], ebx
mov dword [esp + 8], eax
mov esi, dword [esp + 0x38]
mov dword [esp + 0x30], ebx
push esi
call dword [sym.imp.MSVCRT.dll_wcslen]
lea ecx, [esp + 0xc]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
push esi
mov dword [esp + 0x2c], eax
call fcn.00476fa0
add esp, 0x14
test eax, eax
je 0x476f1b
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push edi
mov eax, dword [0x4e30fc]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x24], ebx
mov byte [esp + 0x38], 1
cmp dword [eax - 8], ebx
jl 0x476e8f
push 0x4ee270
push eax
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
cmp eax, ebx
je 0x476e8f
sub eax, dword [esp + 0x10]
sar eax, 1
mov edi, eax
cmp edi, 0xffffffff
je 0x476e8f
push edi
lea eax, [esp + 0x18]
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00446be0
mov esi, eax
mov eax, dword [esi]
mov ecx, dword [esp + 0x28]
cmp ecx, eax
mov byte [esp + 0x38], 2
je 0x476dc8
cmp dword [ecx - 0xc], ebx
jge 0x476d9e
mov edx, dword [0x4e3090]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x476da3
cmp dword [eax - 0xc], ebx
jge 0x476db3
mov ecx, dword [eax - 8]
push eax
push ecx
lea ecx, [esp + 0x30]
call fcn.00405410
jmp 0x476dc8
lea ecx, [esp + 0x28]
call fcn.00405340
mov esi, dword [esi]
mov dword [esp + 0x28], esi
add esi, 0xfffffff4
push esi
call ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [0x4e3090]
mov byte [esp + 0x38], 1
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x476dfc
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x476dfc
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.0049bb1b
add esp, 4
inc edi
lea ecx, [esp + 0x18]
push edi
push ecx
lea ecx, [esp + 0x18]
call fcn.00446bb0
mov esi, eax
mov eax, dword [esi]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
mov byte [esp + 0x38], 3
je 0x476e59
cmp dword [ecx - 0xc], ebx
jge 0x476e2f
mov edx, dword [0x4e3090]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x476e34
cmp dword [eax - 0xc], ebx
jge 0x476e44
mov edx, dword [eax - 8]
push eax
push edx
lea ecx, [esp + 0x34]
call fcn.00405410
jmp 0x476e59
lea ecx, [esp + 0x2c]
call fcn.00405340
mov esi, dword [esi]
mov dword [esp + 0x2c], esi
add esi, 0xfffffff4
push esi
call ebp
mov eax, dword [esp + 0x18]
mov edx, dword [0x4e3090]
mov byte [esp + 0x38], 1
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x476e9d
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x476e9d
mov edx, dword [esp + 0x18]
lea eax, [edx - 0xc]
push eax
call fcn.0049bb1b
add esp, 4
jmp 0x476e9d
lea eax, [esp + 0x10]
lea ecx, [esp + 0x28]
push eax
call fcn.004054a0
lea ecx, [esp + 0x28]
call fcn.00478cc0
lea ecx, [esp + 0x28]
call fcn.00478c00
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x24]
push edx
mov eax, dword [ecx + 8]
push eax
call fcn.004780e0
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], ebx
je 0x476ee8
cmp dword [eax - 0xc], ebx
jl 0x476eda
lea ecx, [esp + 0x10]
call fcn.00405340
jmp 0x476ee8
push 0x4f5820
lea ecx, [esp + 0x14]
call fcn.00473c20
lea ecx, [esp + 0x24]
mov byte [esp + 0x38], bl
call fcn.00476f40
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x44]
push ecx
push edx
push eax
call fcn.00476fa0
add esp, 0x10
test eax, eax
jne 0x476d20
pop edi
pop ebp
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0xffffffff
call fcn.004053e0
mov ecx, dword [esp + 0x28]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret