Function at 0x100010c5
Capabilities:
Access peb ldr_data
Get common file path
Get process filename

Disassembly:
sub esp, 0x120
dec dword [esp + 0x128]
jne 0x100012e7
push ebx
push ebp
push esi
push edi
push 0x108
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [esp + 0x28]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x100010f1
mov esi, 0x10001018
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [esp + 0x28]
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x10], eax
mov eax, dword fs:[0x30]
mov dword [esp + 0x18], eax
mov ecx, dword [eax + 0xc]
mov edi, dword [ecx + 0x14]
mov edi, dword [edi]
push 8
mov edx, dword [edi + 0x28]
pop esi
xor ecx, ecx
movzx eax, word [edx]
or eax, 0x20
add ecx, eax
rol ecx, 0xd
lea edx, [edx + 2]
dec esi
jne 0x1000112b
cmp ecx, 0xe6483aca
je 0x1000114e
test edi, edi
jne 0x10001121
mov edi, dword [esp + 0x18]
jmp 0x10001151
mov edi, dword [edi + 0x10]
mov esi, dword [edi + 0x3c]
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [esi + edi + 0xdc]
mov eax, dword [esi + edi + 0xd8]
lea edx, [esp + 0x1c]
push edx
push 4
add eax, edi
push ecx
push eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
call ebp
mov ecx, dword [esi + edi + 0x80]
add ecx, edi
jmp 0x100011b2
mov edx, dword [ecx + 0xc]
add edx, edi
xor esi, esi
mov al, byte [edx]
test al, al
je 0x100011af
movsx eax, al
or eax, 0x20
add esi, eax
rol esi, 0xd
inc edx
mov al, byte [edx]
test al, al
jne 0x10001195
cmp esi, 0x31e95bdf
je 0x100011ba
add ecx, 0x14
cmp dword [ecx + 0x10], 0
jne 0x10001188
jmp 0x1000120f
mov ebx, dword [ecx]
mov esi, dword [ecx + 0x10]
add ebx, edi
add esi, edi
mov eax, dword [ebx]
test eax, eax
je 0x1000120f
sub ebx, esi
lea edx, [edi + 2]
add edx, eax
xor ecx, ecx
mov al, byte [edx]
test al, al
je 0x100011f2
movsx eax, al
or eax, 0x20
add ecx, eax
rol ecx, 0xd
inc edx
mov al, byte [edx]
test al, al
jne 0x100011d8
cmp ecx, 0x6cfc3aa3
je 0x100011fe
add esi, 4
mov eax, dword [ebx + esi]
test eax, eax
jne 0x100011cb
jmp 0x1000120f
push 0x10001020
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi], eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x20]
push dword [esp + 0x28]
push dword [esp + 0x30]
call ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
lea eax, [esp + 0x14]
mov ebx, dword [esi + 0x3c]
add ebx, esi
push eax
movzx ebp, word [ebx + 0x14]
push 4
mov eax, dword [ebx + ebp + 0x4c]
push dword [ebx + ebp + 0x48]
add eax, esi
push eax
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [ebx + ebp + 0x48]
push ecx
mov ecx, dword [ebx + ebp + 0x4c]
push 0x1000104c
add ecx, esi
call fcn.1000107c
pop ecx
pop ecx
test eax, eax
je 0x1000127e
push 7
pop ecx
mov esi, 0x1000102c
mov edi, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, dword [esp + 0x10]
mov edx, dword [ebx + ebp + 0x48]
push ecx
mov ecx, dword [ebx + ebp + 0x4c]
push 0x10001074
add ecx, esi
call fcn.1000107c
pop ecx
pop ecx
test eax, eax
je 0x100012ab
push 7
pop ecx
mov esi, 0x10001054
mov edi, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
mov eax, dword [ebx + ebp + 0x4c]
push dword [ebx + ebp + 0x48]
add eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [esp + 0x18]
pop edi
mov eax, dword [ecx + 0xc]
mov ecx, dword [esp + 0x130]
mov eax, dword [eax + 0x14]
pop esi
pop ebp
pop ebx
mov eax, dword [eax]
cmp dword [eax + 0x10], ecx
jne 0x100012da
mov eax, dword [eax + 0x28]
mov byte [eax], 0x5f
xor eax, eax
inc eax
add esp, 0x120
ret 0xc