Function at 0x1040083
Capabilities:
Allocate or change rwx memory

Disassembly:
push 0x54
mov eax, 0x11a995e
call fcn.010b143d
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x3c], ebx
test edi, edi
jne 0x10400a9
xor al, al
jmp 0x10402d6
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
mov dword [ebp - 0x38], esi
test esi, esi
je 0x10400a2
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.01186f81
cmp byte [ebp - 0x5c], 0
mov ecx, edi
sete byte [ebp - 0x31]
call fcn.01119645
mov ecx, ebx
call fcn.0103c778
push eax
mov ecx, edi
call fcn.0103de4c
and dword [ebp - 0x30], 0
mov ecx, ebx
call fcn.0103c778
test eax, eax
jbe 0x1040110
lea eax, [ebp - 0x30]
push eax
mov ecx, edi
call fcn.01058221
inc dword [ebp - 0x30]
mov ecx, ebx
call fcn.0103c778
cmp dword [ebp - 0x30], eax
jb 0x10400f6
mov eax, dword [esi + 0x3c]
lea eax, [eax + esi + 0x18]
mov ebx, dword [eax + 0x68]
test ebx, ebx
je 0x10402c7
add ebx, esi
mov dword [ebp - 0x44], ebx
jmp 0x10402bd
mov ecx, edi
call fcn.0103c8b1
test eax, eax
je 0x10402c7
mov eax, dword [ebx + 0xc]
add eax, esi
mov esi, dword [ebx]
add esi, dword [ebp - 0x38]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x40], esi
call fcn.0103686c
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [esi], eax
je 0x10402a4
mov dword [ebp - 0x30], eax
jmp 0x1040168
mov esi, dword [ebp - 0x40]
mov ecx, edi
call fcn.0103c8b1
test eax, eax
je 0x10402a4
mov eax, dword [ebp - 0x30]
mov esi, dword [eax + esi]
test esi, esi
jns 0x1040196
mov ecx, dword [ebp - 0x4c]
movzx eax, si
push eax
push dword [ebp - 0x48]
lea eax, [ebp - 0x2c]
push eax
call fcn.0103e350
jmp 0x10401a7
mov eax, dword [ebp - 0x38]
add eax, esi
add eax, 2
push eax
lea ecx, [ebp - 0x2c]
call fcn.010386a7
mov ecx, edi
xor esi, esi
call fcn.0103c8b1
test eax, eax
jbe 0x1040290
mov eax, dword [edi + 4]
mov ecx, esi
shl ecx, 2
add eax, ecx
mov eax, dword [eax]
mov ecx, dword [ebp - 0x3c]
imul eax, eax, 0x3c
add eax, dword [ecx + 4]
cmp dword [eax + 0x18], 0x10
jb 0x10401d8
mov eax, dword [eax + 4]
jmp 0x10401db
add eax, 4
push dword [ebp - 0x48]
push eax
call dword [sym.imp.msvcrt.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x1040210
mov eax, dword [edi + 4]
mov ecx, esi
shl ecx, 2
add eax, ecx
mov eax, dword [eax]
mov ecx, dword [ebp - 0x3c]
imul eax, eax, 0x3c
add eax, dword [ecx + 4]
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [eax + 0x1c]
call fcn.0103d4f0
test eax, eax
je 0x104021e
mov ecx, edi
inc esi
call fcn.0103c8b1
cmp esi, eax
jb 0x10401b8
jmp 0x1040290
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x3c]
mov ecx, dword [ecx + 4]
mov edx, dword [ebp - 0x30]
shl esi, 2
mov eax, dword [esi + eax]
imul eax, eax, 0x3c
lea eax, [eax + ecx + 0x38]
mov dword [ebp - 0x54], eax
mov eax, dword [ebx + 0x10]
add eax, dword [ebp - 0x38]
push 0x40
pop ecx
lea ebx, [edx + eax]
lea eax, [ebp - 0x58]
push eax
push ecx
push 4
push ebx
mov dword [ebp - 0x50], ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0
push 4
push dword [ebp - 0x54]
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi + 4]
add esi, eax
push esi
lea eax, [ebp - 0x5c]
push eax
mov ecx, edi
call fcn.011475a8
mov ebx, dword [ebp - 0x44]
add dword [ebp - 0x30], 4
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x30]
cmp dword [ecx + eax], 0
jne 0x1040165
or dword [ebp - 4], 0xffffffff
push 0
add ebx, 0x14
push 1
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x44], ebx
call fcn.0103618b
mov esi, dword [ebp - 0x38]
cmp dword [ebx + 0x10], 0
jne 0x104012c
cmp byte [ebp - 0x31], 0
je 0x10402d4
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, 1
call fcn.010b14cf
ret 0xc