Function at 0x408910
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1a0
mov eax, dword [0x47b014]
xor eax, esp
mov dword [esp + 0x19c], eax
mov eax, dword [esp + 0x1ac]
push ebx
mov ebx, dword [esp + 0x1a8]
push ebp
push edi
mov edi, dword [esp + 0x1b4]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1bc]
push 0x40
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x144]
push 0
push eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x4c], 0
call fcn.00402324
mov ebp, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [esp + 0x1c]
add esp, 0xc
push eax
push 0x40
lea eax, [esp + 0x148]
push eax
push edi
push ebx
call ebp
test eax, eax
je 0x408ce4
cmp dword [esp + 0x10], 0x40
jb 0x408ce4
push 0xf8
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.00402324
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push 0xf8
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x188]
add eax, edi
push eax
push ebx
call ebp
test eax, eax
je 0x408ce4
cmp dword [esp + 0x10], 0xf8
jb 0x408ce4
mov eax, 0x10b
cmp word [esp + 0x60], ax
je 0x4089fa
push 9
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x408ce4
movzx ecx, word [esp + 0x5c]
mov eax, dword [esp + 0x17c]
add ecx, 0x18
add eax, ecx
mov dword [esp + 0x118], 0
push esi
xor ecx, ecx
mov dword [esp + 0x120], 0
xor esi, esi
cmp cx, word [esp + 0x52]
jae 0x408ac2
add edi, eax
lea eax, [esp + 0x14]
xorps xmm0, xmm0
push eax
push 0x28
lea eax, [esp + 0x18c]
movq qword [esp + 0x1ac], xmm0
push eax
push edi
push ebx
movups xmmword [esp + 0x198], xmm0
movups xmmword [esp + 0x1a8], xmm0
call ebp
test eax, eax
je 0x408ce3
cmp dword [esp + 0x14], 0x28
jb 0x408ce3
cmp dword [esp + 0x124], 0
jne 0x408ab1
mov edx, dword [esp + 0xcc]
mov ecx, dword [esp + 0x190]
cmp edx, ecx
jb 0x408ab1
mov ebx, dword [esp + 0x194]
lea eax, [ebx + ecx]
cmp edx, eax
jae 0x408aad
mov dword [esp + 0x124], ecx
mov dword [esp + 0x128], ebx
mov ebx, dword [esp + 0x18]
movzx eax, word [esp + 0x52]
inc esi
add edi, 0x28
cmp esi, eax
jb 0x408a33
mov ecx, dword [esp + 0x1c]
mov eax, 0xcccccccd
mul dword [esp + 0xd0]
xor esi, esi
xor edi, edi
mov eax, edx
xor edx, edx
shr eax, 4
mov dword [esp + 0x30], eax
add eax, ecx
shl ecx, 4
lea eax, [eax + eax*4]
lea eax, [eax*4 + 7]
and eax, 0xfffffff8
add ecx, eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
mov ebp, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebp
cmp eax, 2
jb 0x408b6c
lea ebp, [eax - 1]
xor ebx, ebx
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx + edx*4]
lea esi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408b20
sub ecx, esi
lea eax, [ecx + 4]
and eax, 0xfffffffc
add ebx, eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + edx*4 + 4]
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408b40
sub ecx, esi
add edx, 2
lea eax, [ecx + 4]
and eax, 0xfffffffc
add edi, eax
cmp edx, ebp
jb 0x408b11
mov ebp, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x34]
cmp edx, eax
jae 0x408b93
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + edx*4]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408b80
sub ecx, edx
lea ebp, [ecx + 4]
and ebp, 0xfffffffc
add ebp, dword [esp + 0x20]
lea eax, [edi + esi]
add ebp, eax
push ebp
mov dword [esp + 0x28], ebp
call fcn.004022ac
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x408ce3
push ebp
push 0
push eax
call fcn.00402324
mov edx, dword [esp + 0x44]
add esp, 0xc
mov ecx, dword [esp + 0x70]
xorps xmm0, xmm0
mov eax, dword [esp + 0x78]
add ecx, edx
add ecx, dword [esp + 0x6c]
add ecx, dword [esp + 0x68]
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
add eax, ecx
push 0x1c
cmp edx, eax
movq qword [esp + 0x198], xmm0
lea ecx, [esp + 0x188]
mov dword [esp + 0x1a0], 0
push ecx
cmovae eax, edx
push eax
push ebx
movups xmmword [esp + 0x194], xmm0
call ebp
test eax, eax
je 0x408cd0
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
nop dword [eax + eax]
mov edx, dword [esp + 0x190]
mov eax, edx
and eax, 0xfff
cmp eax, 0xfff
je 0x408cd6
cmp dword [esp + 0x194], 0x10000
mov ecx, dword [esp + 0x184]
jne 0x408c98
lea esi, [ecx + 0xffff]
and esi, 0xffff0000
lea eax, [edx + ecx]
cmp esi, eax
jae 0x408c98
push 4
push 0x3000
push dword [esp + 0x2c]
push esi
push ebx
call edi
mov ebx, eax
test ebx, ebx
jne 0x408d00
mov edx, dword [esp + 0x190]
add esi, 0x10000
mov ecx, dword [esp + 0x184]
mov ebx, dword [esp + 0x18]
lea eax, [edx + ecx]
cmp esi, eax
jb 0x408c60
lea eax, [edx + ecx]
mov dword [esp + 0x19c], 0
push 0x1c
lea ecx, [esp + 0x188]
xorps xmm0, xmm0
push ecx
push eax
push ebx
movups xmmword [esp + 0x194], xmm0
movq qword [esp + 0x1a4], xmm0
call ebp
test eax, eax
jne 0x408c20
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, dword [esp + 0x10]
push ebp
call fcn.00402f45
add esp, 4
pop esi
mov ecx, dword [esp + 0x1a8]
mov eax, dword [esp + 0x40]
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.004022c0
add esp, 0x1a0
ret
mov edx, dword [esp + 0x38]
mov edi, ebx
mov ecx, dword [esp + 0xcc]
sub edi, edx
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], 0
test ecx, ecx
je 0x408d60
mov eax, dword [esp + 0x30]
lea esi, [eax + eax*4]
lea eax, [esp + 0x14]
shl esi, 2
push eax
mov eax, dword [esp + 0x20]
push esi
lea eax, [eax + eax*4]
lea eax, [eax*4]
add eax, ebp
push eax
lea eax, [ecx + edx]
push eax
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x408cda
cmp dword [esp + 0x14], esi
jb 0x408cda
xor ecx, ecx
mov dword [esp + 0x40], ecx
cmp dword [esp + 0x1c], ecx
jbe 0x408e71
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
lea eax, [edi + esi]
mov dword [esp + 0x2c], eax
lea ebp, [edx + 4]
lea eax, [edx + 4]
add eax, esi
mov dword [esp + 0x30], eax
nop dword [eax + eax]
mov eax, dword [esp + 0x28]
push dword [eax + ecx*4]
mov edi, dword [esp + 0x28]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x24]
sub edi, ecx
push edi
mov dword [esp + 0x50], eax
lea esi, [ecx + edx]
push esi
call fcn.004034fe
test eax, eax
js 0x408cd6
test edi, edi
je 0x408de0
test esi, esi
je 0x408de0
cmp edi, 2
jb 0x408de0
cmp byte [esi], 0x3f
jne 0x408dd2
cmp byte [esi + 1], 0x3f
je 0x408ddb
dec edi
inc esi
cmp edi, 2
jae 0x408dc7
jmp 0x408de0
mov word [esi], 0x3233
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x48]
mov dword [ebp - 4], edi
mov dword [esi - 4], 0x80000001
mov dword [esi], 0
lea eax, [edi + 8]
mov dword [ebp + 0xc], eax
mov eax, dword [esp + 0x34]
add eax, dword [esp + 0x20]
mov dword [esi + 4], 0x80000001
mov dword [esi + 8], 0
mov dword [ebp], 0
mov dword [ebp + 4], 0
mov dword [ebp + 8], eax
mov ecx, dword [ecx]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408e30
sub ecx, edx
add edi, 0x10
mov edx, dword [esp + 0x10]
add esi, 0x10
add ebp, 0x14
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
lea eax, [ecx + 4]
mov ecx, dword [esp + 0x40]
and eax, 0xfffffffc
inc ecx
add dword [esp + 0x20], eax
mov dword [esp + 0x40], ecx
cmp ecx, dword [esp + 0x1c]
jb 0x408d90
mov edi, dword [esp + 0x34]
mov ebp, edx
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push dword [esp + 0x24]
push ebp
push ebx
mov ebx, dword [esp + 0x28]
push ebx
call esi
test eax, eax
je 0x408cda
cmp dword [esp + 0x124], 0
mov eax, dword [esp + 0x24]
jne 0x408eaa
mov dword [esp + 0x124], edi
mov dword [esp + 0x128], eax
mov dword [esp + 0xd0], eax
lea eax, [esp + 0x3c]
push eax
push 0x40
push dword [esp + 0xa8]
mov dword [esp + 0xd8], edi
mov edi, dword [esp + 0x44]
push edi
push ebx
call fcn.00403b75
test eax, eax
je 0x408cda
push 0
push 0x40
lea eax, [esp + 0x14c]
mov dword [esp + 0xac], 0
push eax
push edi
push ebx
call esi
test eax, eax
je 0x408cda
push 0
push 0xf8
lea eax, [esp + 0x54]
push eax
mov eax, dword [esp + 0x18c]
add eax, edi
push eax
push ebx
call esi
test eax, eax
je 0x408cda
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x40]
push dword [esp + 0xa8]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x408cda
mov dword [esp + 0x44], 1
jmp 0x408cda