Function at 0x470bd0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4cbb20
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [0x4de108]
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.00470eb0
add esp, 0x14
test eax, eax
je 0x470e2b
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push edi
mov eax, dword [0x4de108]
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 0x470d9f
push 0x4e9d84
push eax
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
cmp eax, ebx
je 0x470d9f
sub eax, dword [esp + 0x10]
sar eax, 1
mov edi, eax
cmp edi, 0xffffffff
je 0x470d9f
push edi
lea eax, [esp + 0x18]
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.004420c0
mov esi, eax
mov eax, dword [esi]
mov ecx, dword [esp + 0x28]
cmp ecx, eax
mov byte [esp + 0x38], 2
je 0x470cd8
cmp dword [ecx - 0xc], ebx
jge 0x470cae
mov edx, dword [0x4de090]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x470cb3
cmp dword [eax - 0xc], ebx
jge 0x470cc3
mov ecx, dword [eax - 8]
push eax
push ecx
lea ecx, [esp + 0x30]
call fcn.004054b0
jmp 0x470cd8
lea ecx, [esp + 0x28]
call fcn.004053e0
mov esi, dword [esi]
mov dword [esp + 0x28], esi
add esi, 0xfffffff4
push esi
call ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [0x4de090]
mov byte [esp + 0x38], 1
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x470d0c
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x470d0c
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.00495c27
add esp, 4
inc edi
lea ecx, [esp + 0x18]
push edi
push ecx
lea ecx, [esp + 0x18]
call fcn.00442090
mov esi, eax
mov eax, dword [esi]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
mov byte [esp + 0x38], 3
je 0x470d69
cmp dword [ecx - 0xc], ebx
jge 0x470d3f
mov edx, dword [0x4de090]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x470d44
cmp dword [eax - 0xc], ebx
jge 0x470d54
mov edx, dword [eax - 8]
push eax
push edx
lea ecx, [esp + 0x34]
call fcn.004054b0
jmp 0x470d69
lea ecx, [esp + 0x2c]
call fcn.004053e0
mov esi, dword [esi]
mov dword [esp + 0x2c], esi
add esi, 0xfffffff4
push esi
call ebp
mov eax, dword [esp + 0x18]
mov edx, dword [0x4de090]
mov byte [esp + 0x38], 1
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x470dad
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x470dad
mov edx, dword [esp + 0x18]
lea eax, [edx - 0xc]
push eax
call fcn.00495c27
add esp, 4
jmp 0x470dad
lea eax, [esp + 0x10]
lea ecx, [esp + 0x28]
push eax
call fcn.00405540
lea ecx, [esp + 0x28]
call fcn.00472bd0
lea ecx, [esp + 0x28]
call fcn.00472b10
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x24]
push edx
mov eax, dword [ecx + 8]
push eax
call fcn.00471ff0
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], ebx
je 0x470df8
cmp dword [eax - 0xc], ebx
jl 0x470dea
lea ecx, [esp + 0x10]
call fcn.004053e0
jmp 0x470df8
push 0x4f04e0
lea ecx, [esp + 0x14]
call fcn.0046dc80
lea ecx, [esp + 0x24]
mov byte [esp + 0x38], bl
call fcn.00470e50
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.00470eb0
add esp, 0x10
test eax, eax
jne 0x470c30
pop edi
pop ebp
lea ecx, [esp + 8]
mov dword [esp + 0x30], 0xffffffff
call fcn.00405480
mov ecx, dword [esp + 0x28]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret