Function at 0x40ec10
Capabilities:
Access peb ldr_data
Get common file path
Get ntdll base address
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x47cc69
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x22c
mov eax, dword [0x4a8ae4]
xor eax, esp
push ebx
push ebp
push esi
mov dword [esp + 0x234], eax
push edi
mov dword [esp + 0x244], 0
call fcn.00476002
mov esi, dword [eax + 4]
xor eax, eax
mov word [esp + 0x30], 0
mov ecx, 0x81
lea edi, [esp + 0x32]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x30]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, dword [esi + 0xd0]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [esp + 0x18]
call fcn.0044046d
mov byte [esp + 0x244], 1
call fcn.004621d7
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
push 0
push 0x48a060
lea ecx, [esp + 0x20]
mov byte [esp + 0x24c], 2
call fcn.00440502
lea ecx, [esp + 0x24c]
mov edi, eax
call fcn.00408220
test edi, edi
je 0x40edda
lea ecx, [esp + 0x18]
call fcn.00440360
mov ebx, eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
call fcn.004407ec
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea edi, [esi - 0x10]
cmp eax, edi
mov byte [esp + 0x244], 3
je 0x40ed4c
mov edx, dword [edi + 0xc]
test edx, edx
lea esi, [edi + 0xc]
jl 0x40ed3a
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x40ed3a
push eax
call fcn.00401570
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x40ed31
mov ecx, dword [edi]
mov edx, dword [ecx]
push edi
call dword [edx + 4]
lea esi, [ebp + 0x10]
mov dword [esp + 0x10], esi
jmp 0x40ed4c
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00403be0
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x244], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ed72
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esi - 4]
mov edi, dword [esi - 0xc]
mov ecx, 1
sub ecx, eax
mov eax, dword [esi - 8]
sub eax, edi
or eax, ecx
jge 0x40ed96
push edi
lea ecx, [esp + 0x14]
call fcn.00401520
mov esi, dword [esp + 0x10]
push esi
call fcn.0044a7c3
add esp, 4
test edi, edi
jl 0x40eed1
cmp edi, dword [esi - 8]
jg 0x40eed1
mov dword [esi - 0xc], edi
mov word [esi + edi*2], 0
mov edi, dword [esp + 0x24c]
push esi
push edi
call fcn.0044a53d
add esp, 8
test eax, eax
je 0x40ee6f
test ebx, ebx
jne 0x40ecd5
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [esi - 0x10]
mov byte [esp + 0x244], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ee07
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x18]
mov byte [esp + 0x244], 0
call fcn.00440493
mov eax, dword [esp + 0x24c]
add eax, 0xfffffff0
mov dword [esp + 0x244], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ee44
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
mov ecx, dword [esp + 0x23c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x22c]
pop ebx
xor ecx, esp
call fcn.0044a318
add esp, 0x238
ret 4
lea eax, [esi - 0x10]
mov byte [esp + 0x244], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ee91
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x18]
mov byte [esp + 0x244], 0
call fcn.00440493
lea eax, [edi - 0x10]
mov dword [esp + 0x244], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eec7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 1
jmp 0x40ee46
push 0x80070057
call fcn.004010a0
int3