Function at 0x401c80
Capabilities:
Create thread
Get file size
Get system information on windows
Inject dll
Inject thread
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x421040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x84], eax
push ebx
mov ebx, edx
push esi
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
je 0x4024ff
test edi, edi
je 0x4024ff
mov dword [eax], 0
push 0
mov dword [edi], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x7c], esi
cmp esi, 0xffffffff
jne 0x401d09
mov dword [edi], 1
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
lea eax, ds:[ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push esi
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x401d4a
push esi
mov dword [edi], 2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1c], 0
je 0x401d70
push esi
mov dword [edi], 3
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
cmp eax, 0x4e0
jae 0x401d9d
push esi
mov dword [edi], 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
push eax
call fcn.00404e29
push dword [ebp - 0x18]
mov esi, eax
push 0
push esi
mov dword [ebp - 0x74], esi
call fcn.00406870
add esp, 0x10
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x28]
push 0
push eax
push dword [ebp - 0x20]
push esi
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x7c]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
test esi, esi
jne 0x401e1c
mov eax, dword [ebp - 0x74]
mov dword [edi], 5
test ecx, ecx
je 0x401f85
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x401df5
push dword [ebp - 0x74]
call fcn.00404b95
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
nop dword [eax]
cmp dword [ebp - 0x28], ecx
je 0x401e5d
mov eax, dword [ebp - 0x74]
mov dword [edi], 6
test ecx, ecx
je 0x401f85
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x401e36
push dword [ebp - 0x74]
call fcn.00404b95
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
mov esi, dword [0x422454]
lea eax, [ebp - 0x30]
push eax
push 0
push ecx
push dword [ebp - 0x74]
mov ecx, esi
mov dword [ebp - 0x30], 0
push 0
call dword [0x4171ac]
nop
call esi
test eax, eax
je 0x401ec9
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x74]
mov dword [edi], 7
test ecx, ecx
je 0x401f85
nop word [eax + eax]
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x401ea0
push dword [ebp - 0x74]
call fcn.00404b95
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x30]
mov ecx, 0x14c
cmp word [eax + 4], cx
je 0x401f1b
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x74]
mov dword [edi], 8
test ecx, ecx
je 0x401f85
nop dword [eax + eax]
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x401ef0
push dword ds:[ebp - 0x74]
call fcn.00404b95
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
movzx eax, word [eax + 0x16]
mov ecx, eax
test al, 2
jne 0x401f5c
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x74]
mov dword [edi], 9
test ecx, ecx
je 0x401f85
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x401f35
push dword [ebp - 0x74]
call fcn.00404b95
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
nop dword [eax]
test ecx, 0x2000
jne 0x401fa3
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x74]
mov dword [edi], 0xa
test ecx, ecx
je 0x401f85
mov byte ds:[eax], 0
inc eax
sub ecx, 1
jne 0x401f78
push dword [ebp - 0x74]
call fcn.00404b95
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x74]
mov eax, ecx
test edx, edx
je 0x401fbb
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub edx, 1
jne 0x401fb0
push ecx
call fcn.00404b95
mov ecx, ebx
add esp, 4
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401fd0
sub ecx, edx
mov dword [ebp - 0x34], 0
sar ecx, 1
lea eax, [ebp - 0x54]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x54], xmm0
lea ecx, [ecx*2 + 2]
mov dword [ebp - 0x18], ecx
movups xmmword [ebp - 0x44], xmm0
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
cmp dword [ebp - 0x50], 0
je 0x4024f9
cmp dword [ebp - 0x38], 0
je 0x4024f9
push 0
xor edx, edx
mov ecx, str.bcryptprimitives.dll
call fcn.00401ba0
add esp, 4
test al, al
jne 0x402049
mov dword ds:[edi], 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
push 0x422440
mov edx, str.BCryptGenRandom
mov ecx, str.Bcrypt.dll
call fcn.00401ba0
add esp, 4
test al, al
jne 0x40207b
mov dword [edi], 0xd
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
mov esi, dword [0x422440]
lea eax, [ebp - 0x14]
push 0
push 0xe
push eax
xorps xmm0, xmm0
mov dword [0x422444], esi
push 0x81
mov ecx, esi
movq qword [ebp - 0x14], xmm0
mov dword [ebp - 0xc], 0
mov word [ebp - 8], 0
call dword [0x4171ac]
call esi
test eax, eax
je 0x4020d0
mov dword [edi], 0xe
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
movd xmm2, dword [ebp - 0x14]
xorps xmm0, xmm0
movd xmm1, dword [ebp - 0x10]
xor edx, edx
punpcklbw xmm2, xmm0
mov ecx, 8
punpcklwd xmm2, xmm0
xor esi, esi
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
paddd xmm2, xmm1
movaps xmm0, xmm2
psrldq xmm0, 8
paddd xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 4
paddd xmm2, xmm0
movzx eax, byte [ebp + ecx - 0x14]
add edx, eax
movzx eax, byte [ebp + ecx - 0x13]
add ecx, 2
add esi, eax
cmp ecx, 0xd
jb 0x402112
cmp ecx, 0xe
jae 0x40213a
movzx eax, byte [ebp + ecx - 0x14]
movd ecx, xmm2
add ecx, eax
jmp 0x40213e
movd ecx, xmm2
lea eax, [esi + edx]
add ecx, eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x7c], ecx
mov ecx, 0xe
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x402150
mov ecx, dword [ebp - 0x50]
mov eax, ecx
mov esi, dword [ebp - 0x18]
sub eax, esi
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 0x7c], eax
jb 0x402189
mov dword ds:[edi], 0xf
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
push ecx
call fcn.00404e29
push dword [ebp - 0x24]
mov dword [ebp - 0x80], eax
push 0
push eax
call fcn.00406870
add esp, 0x10
push 4
push 0x3000
push dword [ebp - 0x50]
push 0
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword ds:[ebp - 0x74], eax
test eax, eax
je 0x4024a4
push 0x1c
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x70], 0
push ecx
push eax
push dword [ebp - 0x78]
xorps xmm0, xmm0
movups xmmword [ebp - 0x6c], xmm0
movq qword [ebp - 0x5c], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
cmp eax, 0x1c
je 0x402229
mov dword [edi], 0x11
mov eax, dword [ebp - 0x74]
push 0x8000
push 0
push eax
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push dword [ebp - 0x80]
call fcn.00404b95
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x68], 4
je 0x402237
mov dword [edi], 0x12
jmp 0x4021f6
mov eax, dword [ebp - 0x64]
cmp eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x74]
je 0x40224a
mov dword [edi], 0x13
jmp 0x4021f9
cmp dword [ebp - 0x5c], 4
je 0x402258
mov dword [edi], 0x14
jmp 0x4021f9
add eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x2c]
push ecx
push esi
push ebx
push eax
push dword [ebp - 0x78]
lfence
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x88], eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
nop dword [eax + eax]
cmp eax, 1
jne 0x40249d
cmp dword [ebp - 0x2c], esi
jne 0x40249d
push dword ds:[ebp - 0x50]
push dword [ebp - 0x74]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, ds:[ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
push 2
push dword [ebp - 0x50]
push dword [ebp - 0x74]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp eax, 1
jne 0x402496
cmp dword [ebp - 0x24], 4
jne 0x402496
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push dword [ebp - 0x50]
push dword [ebp - 0x80]
push dword [ebp - 0x74]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp eax, 1
jne 0x40248f
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x50]
jne 0x40248f
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x80]
add ecx, edx
lfence
sub esi, 4
jb 0x402331
nop dword [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x402336
add ecx, 4
add ebx, 4
sub esi, 4
jae 0x402320
cmp esi, 0xfffffffc
je 0x402371
mov al, byte [ecx]
cmp al, byte [ebx]
jne 0x402367
nop dword [eax]
cmp esi, 0xfffffffd
je 0x402371
mov al, byte [ecx + 1]
cmp al, byte [ebx + 1]
jne 0x402367
cmp esi, 0xfffffffe
je 0x402371
mov al, byte [ecx + 2]
cmp al, byte [ebx + 2]
jne 0x402367
cmp esi, 0xffffffff
je 0x402371
mov al, byte [ecx + 3]
cmp al, byte [ebx + 3]
je 0x402371
mov eax, 0x18
jmp 0x4024a9
lfence
mov ecx, dword [ebp - 0x50]
mov eax, edx
test ecx, ecx
je 0x40238b
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x402380
push edx
call fcn.00404b95
add esp, 4
push str.LoadLibraryW
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [ebp - 0x78]
push 0
push 0
push dword [ebp - 0x88]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov edi, eax
test edi, edi
je 0x402432
push 0xffffffffffffffff
push edi
lfence
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x84]
test eax, eax
jne 0x4023f6
mov dword [edi], 2
cmp ebx, 0xffffffff
je 0x402408
nop dword [eax + eax]
cmp ebx, 0x102
jne 0x40243e
push 0x8000
push 0
push dword [ebp - 0x74]
mov dword [edi], 3
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x84]
mov dword [edi], 1
push dword [ebp - 0x50]
mov ebx, dword [ebp - 0x74]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
push 0x8000
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
test eax, eax
jne 0x402478
mov dword [edi], 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
cmp dword [edi], 0
sete al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
mov eax, 0x17
jmp 0x4024a9
mov eax, 0x16
jmp 0x4024a9
mov eax, 0x15
jmp 0x4024a9
mov eax, 0x10
mov edx, dword [ebp - 0x80]
mov dword [edi], eax
mov eax, edx
mov ecx, dword [ebp - 0x50]
test ecx, ecx
je 0x4024c5
mov byte ds:[eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4024b7
push edx
call fcn.00404b95
mov eax, dword [ebp - 0x74]
add esp, 4
test eax, eax
je 0x4024ff
push 0x8000
push 0
push eax
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404b87
mov esp, ebp
pop ebp
ret
mov dword [edi], 0xb
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404b87
mov esp, ebp
pop ebp
ret