Function at 0x401000
Capabilities:
Access peb ldr_data
Resolve function by hash

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
push ebx
xor ebx, ebx
test byte [0x405030], 1
je 0x401034
cmp dword [0x405008], ebx
jne 0x401034
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x405008], eax
cmp eax, ebx
jne 0x401034
xor eax, eax
jmp 0x401309
call fcn.00403677
test eax, eax
je 0x40102d
call fcn.00403a02
test eax, eax
je 0x40102d
push esi
push edi
cld
mov edx, dword fs:[0x30]
mov edx, dword [edx + 0xc]
mov edx, dword [edx + 0x14]
mov esi, dword [edx + 0x28]
mov ecx, 0x18
xor edi, edi
xor eax, eax
lodsb al, byte [esi]
cmp al, 0x61
jl 0x401069
sub al, 0x20
ror edi, 0xd
add edi, eax
loop 0x401060
cmp edi, 0x6a4abc5b
mov eax, dword [edx + 0x10]
mov edx, dword [edx]
jne 0x401056
push 0x404178
mov edi, eax
call fcn.004034b1
mov dword [ebp - 0x24], eax
xor eax, eax
mov byte [ebp - 0x18], 0
lea edi, [ebp - 0x17]
stosd dword es:[edi], eax
stosw word es:[edi], ax
pop ecx
mov ecx, dword [0x405008]
stosb byte es:[edi], al
mov eax, dword [ecx + 0x3c]
mov esi, dword [eax + ecx + 0x80]
add esi, ecx
mov dword [ebp - 8], ecx
cmp dword [esi], ebx
je 0x401183
mov eax, dword [esi + 0xc]
add eax, dword [ebp - 8]
push eax
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, dword [esi]
mov ebx, dword [esi + 0x10]
add edi, dword [ebp - 8]
add ebx, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
jmp 0x40116c
and dword [ebp - 0x10], 0
test eax, eax
jns 0x4010e9
and eax, 0xffff
jmp 0x4010f0
mov ecx, dword [ebp - 8]
lea eax, [eax + ecx + 2]
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 4], eax
call dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x401300
lea ecx, [ebp - 0x18]
push 8
push ecx
call fcn.00402520
cmp byte [ebp - 0x18], 0xe9
pop ecx
pop ecx
je 0x40111e
cmp byte [ebp - 0x18], 0xeb
jne 0x401144
push dword [ebp - 0x28]
call fcn.004038cc
pop ecx
mov dword [ebp - 0x20], eax
test eax, eax
je 0x401144
push dword [ebp - 4]
push dword [ebp - 0xc]
call fcn.00403502
push dword [ebp - 0x20]
call fcn.004024a1
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push 4
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0xc]
push 0
push dword [ebp - 0x10]
mov dword [ebx], eax
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
add ebx, 4
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x4010da
add esi, 0x14
cmp dword [esi], eax
jne 0x4010b7
xor ebx, ebx
test byte [0x405030], 1
je 0x4011a4
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x405010], eax
cmp eax, ebx
je 0x401300
push 0x208
call fcn.0040245c
mov esi, eax
mov dword [esp], 0x104
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
and eax, esi
mov dword [0x405024], eax
cmp eax, ebx
je 0x401300
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x405034], eax
cmp eax, ebx
je 0x401300
call fcn.004030ff
movzx eax, al
mov dword [0x405044], eax
cmp eax, ebx
je 0x401300
cmp eax, 0x1f
jb 0x401300
or esi, 0xffffffff
push esi
call fcn.00403212
pop ecx
mov dword [0x405048], eax
cmp eax, ebx
je 0x401300
push esi
call fcn.004031c6
push esi
mov dword [0x405038], eax
call fcn.00403293
pop ecx
pop ecx
mov byte [0x40503c], al
test al, al
je 0x401300
push 0x405014
call fcn.00401f55
pop ecx
test eax, eax
je 0x401300
mov al, byte [0x40503c]
cmp al, 0x13
jne 0x40126e
cmp dword [0x405044], 0x3f
jae 0x401300
mov byte [0x40503c], 0x20
jmp 0x401276
cmp al, 0x20
jb 0x401300
lea eax, [ebp - 4]
push eax
push esi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
jle 0x401290
cmp dword [ebp - 4], ebx
setne al
jmp 0x401293
mov al, byte [ebp - 4]
movzx eax, al
mov dword [0x405040], eax
call fcn.00402fe7
mov dword [0x405028], eax
cmp dword [0x40502c], ebx
jne 0x4012c2
push 0x11
lea esi, [ebp - 0xa8]
pop eax
call fcn.00401873
mov eax, esi
mov dword [0x40502c], eax
push 0x48
call fcn.0040245c
mov esi, eax
pop ecx
cmp esi, ebx
je 0x4012e4
call fcn.00402240
cmp eax, 1
jne 0x4012e4
call fcn.004022bd
cmp eax, 1
je 0x4012ed
push esi
call fcn.004024a1
pop ecx
xor esi, esi
test byte [0x405030], 2
mov dword [0x40504c], esi
je 0x401304
cmp esi, ebx
jne 0x401304
xor eax, eax
jmp 0x401307
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret