joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4bf4e4
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push ebx
push esi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00404934
xor eax, eax
push ebp
push 0x4bf5ed
push dword fs:[eax]
mov dword fs:[eax], esp
mov word [ebx + 4], 0
mov ax, word [esi + 4]
mov word [ebx + 6], ax
mov ax, word [esi + 6]
mov word [ebx + 8], ax
mov ax, word [esi + 8]
mov word [ebx + 0xa], ax
mov eax, dword [esi + 0xa]
call fcn.004beab8
mov dword [ebx + 0xc], eax
mov eax, dword [esi + 0xe]
mov dword [ebx + 0x10], eax
mov eax, dword [esi + 0x12]
mov dword [ebx + 0x14], eax
mov eax, dword [esi + 0x16]
mov dword [ebx + 0x18], eax
mov ax, word [esi + 0x1a]
mov word [ebx + 0x1c], ax
mov ax, word [esi + 0x1c]
mov word [ebx + 0x20], ax
mov word [ebx + 0x22], 0
mov word [ebx + 0x24], 0
mov word [ebx + 0x26], 0
xor eax, eax
mov dword [ebx + 0x28], eax
xor eax, eax
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x30], 0
mov dword [ebx + 0x34], 0
cmp dword [ebp - 4], 0
je 0x4bf5b3
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00409af4
mov edx, dword [ebp - 8]
mov eax, ebx
call fcn.004bfd9c
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.004099d8
mov edx, dword [ebp - 0xc]
mov eax, ebx
call fcn.004bfe10
jmp 0x4bf5c5
xor edx, edx
mov eax, ebx
call fcn.004bfd9c
xor edx, edx
mov eax, ebx
call fcn.004bfe10
xor eax, eax
mov dword [ebx + 0x44], eax
mov byte [ebx + 0x48], 0
mov byte [ebx + 0x4a], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4bf5f4
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004044a8
ret

Function at 0x4c5d5c
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
push esi
push edi
mov ebx, edx
mov edi, eax
mov ecx, dword [edi + 0x170]
mov edx, ebx
mov eax, edi
call fcn.004c5f90
mov esi, eax
mov dword [edi + 0x170], esi
and esi, 0xff
add dword [edi + 0x174], esi
imul esi, dword [edi + 0x174], 0x8088405
inc esi
mov dword [edi + 0x174], esi
mov edx, esi
shr edx, 0x18
mov ecx, dword [edi + 0x178]
mov eax, edi
call fcn.004c5f90
mov dword [edi + 0x178], eax
pop edi
pop esi
pop ebx
ret

Function at 0x4c5dd0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov ebx, edx
mov edi, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x4c5df5
inc esi
mov eax, edi
call fcn.004c5db4
xor byte [ebx], al
mov dl, byte [ebx]
mov eax, edi
call fcn.004c5d5c
inc ebx
dec esi
jne 0x4c5ddf
pop edi
pop esi
pop ebx
ret
Function at 0x4c5e84
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov esi, ecx
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], edx
mov edi, eax
mov eax, dword [ebp - 4]
call fcn.00404934
xor eax, eax
push ebp
push 0x4c5ef9
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 4]
mov eax, edi
call fcn.004c5dfc
mov dword [ebp - 8], 0xc
lea esi, [ebp - 0x14]
mov eax, edi
call fcn.004c5db4
mov ebx, eax
xor bl, byte [esi]
mov edx, ebx
mov eax, edi
call fcn.004c5d5c
mov byte [esi], bl
inc esi
dec dword [ebp - 8]
jne 0x4c5ec4
mov bl, byte [ebp - 9]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c5f00
lea eax, [ebp - 4]
call fcn.00404484
ret
Function at 0x4c6abc
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4c6ca0
push dword fs:[eax]
mov dword fs:[eax], esp
cmp ebx, 0xffffffff
jle 0x4c6c5c
mov eax, dword [ebp - 4]
call fcn.004c8438
cmp ebx, eax
jge 0x4c6c5c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x118]
mov edx, ebx
call fcn.004bd3c4
mov edx, dword [0x4bee7c]
call fcn.00403780
mov esi, eax
mov eax, esi
call fcn.004bfd30
test al, al
je 0x4c6c52
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov edi, dword [esi + 0x44]
test edi, edi
jne 0x4c6c46
xor eax, eax
push ebp
push 0x4c6c3f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.004c7074
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x130]
call fcn.004205dc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
push dword [esi + 0x34]
push dword [esi + 0x30]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x130]
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0x18]
lea edx, [ebp - 0x46]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x130]
mov ecx, 0x2e
mov esi, dword [eax]
call dword [esi + 0xc]
movzx eax, word [ebp - 0x2a]
movzx edx, word [ebp - 0x28]
add eax, edx
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x130]
mov dl, 1
mov ecx, dword [eax]
call dword [ecx + 0x18]
movzx esi, word [ebp - 0x26]
mov eax, dword [ebp - 8]
mov edx, esi
call fcn.00404ad0
mov eax, dword [ebp - 8]
call fcn.0040499c
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x130]
mov ecx, esi
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
mov al, byte [eax + 0x28]
mov byte [ebp - 9], al
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.004c6e38
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
mov dl, byte [ebp - 9]
mov byte [eax + 0x28], dl
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c6c8a
push dword [ebp - 0x14]
push dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x130]
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x3c]
test al, al
jne 0x4c6c3e
mov eax, dword [ebp - 4]
call fcn.004c70f8
ret
mov edx, dword [ebp - 8]
mov eax, edi
call fcn.00409e98
jmp 0x4c6c8a
mov eax, dword [ebp - 8]
call fcn.00404484
jmp 0x4c6c8a
mov dword [ebp - 0x50], ebx
mov byte [ebp - 0x4c], 0
lea eax, [ebp - 0x50]
push eax
push 0
lea edx, [ebp - 0x54]
mov eax, 0xb3
call fcn.00409420
mov ecx, dword [ebp - 0x54]
mov dl, 1
mov eax, dword [0x41b43c]
call fcn.0040d340
call fcn.00403e20
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c6ca7
lea eax, [ebp - 0x54]
call fcn.00404484
ret
Function at 0x4d9a00
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x4d9a08
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x4d9bfa
push dword fs:[eax]
mov dword fs:[eax], esp
mov esi, dword [ebx + 8]
lea ecx, [ebp - 0xc]
mov edx, 0x4d9c10
mov eax, esi
call fcn.004d788c
mov edx, dword [ebp - 0xc]
lea eax, [ebx + 0xc]
call fcn.004044d8
lea ecx, [ebp - 0x10]
mov edx, 0x4d9c24
mov eax, esi
call fcn.004d788c
mov edx, dword [ebp - 0x10]
lea eax, [ebx + 0x28]
call fcn.004044d8
lea ecx, [ebp - 0x14]
mov edx, 0x4d9c3c
mov eax, esi
call fcn.004d788c
mov edx, dword [ebp - 0x14]
lea eax, [ebx + 0x10]
call fcn.004044d8
lea ecx, [ebp - 0x18]
mov edx, 0x4d9c58
mov eax, esi
call fcn.004d788c
mov edx, dword [ebp - 0x18]
lea eax, [ebx + 0x14]
call fcn.004044d8
lea ecx, [ebp - 0x1c]
mov edx, 0x4d9c74
mov eax, esi
call fcn.004d788c
mov edx, dword [ebp - 0x1c]
lea eax, [ebx + 0x24]
call fcn.004044d8
lea ecx, [ebp - 0x24]
mov edx, 0x4d9c8c
mov eax, esi
call fcn.004d788c
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x20]
call fcn.00408d64
mov eax, dword [ebp - 0x20]
or edx, 0xffffffff
call fcn.00409144
mov edi, eax
mov dword [ebx + 0x18], edi
test edi, edi
setge al
mov byte [ebx + 0x4c], al
lea ecx, [ebp - 0x28]
mov edx, 0x4d9ca4
mov eax, esi
call fcn.004d788c
mov eax, dword [ebp - 0x28]
call fcn.004d1364
fstp qword [ebx + 0x30]
wait
lea ecx, [ebp - 0x2c]
mov edx, 0x4d9cb4
mov eax, esi
call fcn.004d788c
mov eax, dword [ebp - 0x2c]
call fcn.004d1364
fstp qword [ebx + 0x40]
wait
lea ecx, [ebp - 0x30]
mov edx, 0x4d9ccc
mov eax, esi
call fcn.004d788c
mov eax, dword [ebp - 0x30]
or edx, 0xffffffff
call fcn.00409144
inc eax
je 0x4d9b9d
lea ecx, [ebp - 0x34]
mov edx, 0x4d9ccc
mov eax, esi
call fcn.004d788c
mov eax, dword [ebp - 0x34]
call fcn.00409108
mov edi, eax
mov eax, edi
mov ecx, 0xe10
cdq
idiv ecx
mov dword [ebp - 8], eax
mov eax, edi
mov ecx, 0xe10
cdq
idiv ecx
mov ecx, edx
mov eax, ecx
push ecx
mov ecx, 0x3c
cdq
idiv ecx
pop ecx
mov dword [ebp - 4], eax
mov eax, ecx
mov ecx, 0x3c
cdq
idiv ecx
mov edi, edx
push 0
mov ecx, edi
mov dx, word [ebp - 4]
mov ax, word [ebp - 8]
call fcn.0040b15c
fstp qword [ebp - 0x3c]
wait
call fcn.0040b4c0
fadd qword [ebp - 0x3c]
fstp qword [ebx + 0x38]
wait
jmp 0x4d9bb8
lea ecx, [ebp - 0x40]
mov edx, 0x4d9ccc
mov eax, esi
call fcn.004d788c
mov eax, dword [ebp - 0x40]
call fcn.004d1364
fstp qword [ebx + 0x38]
wait
lea ecx, [ebp - 0x44]
mov edx, 0x4d9cdc
mov eax, esi
call fcn.004d788c
mov edx, dword [ebp - 0x44]
lea eax, [ebx + 0x48]
call fcn.004044d8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d9c01
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.004044a8
lea eax, [ebp - 0x34]
mov edx, 0xb
call fcn.004044a8
ret
Function at 0x4e098c
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
xor edx, edx
push ebp
push 0x4e09e6
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [eax + 0x30]
call fcn.004e097c
mov ebx, eax
lea edx, [ebp - 4]
mov eax, edi
call fcn.004cffd0
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0xc]
call fcn.004cfbd0
mov edx, dword [esi + 8]
mov eax, dword [ebx + 0x10]
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4e09ed
lea eax, [ebp - 4]
call fcn.00404484
ret
Function at 0x433002
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..retplne
push 4
nop
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x433072
nop
nop
nop
mov ebx, 0x40de38
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
pop eax
nop
nop
nop
nop
mov esi, 0x138b1e12
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
nop
add eax, edi
nop
loop 0x433060
nop
nop
nop
mov eax, section..reloc
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x4330d2
nop
nop
mov ebx, 0x4304d8
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
div edi
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
mov esi, 0x794b1ad5
nop
nop
nop
nop
nop
xor dword [eax], esi
nop
add eax, edi
nop
nop
nop
loop 0x4330c0
nop
nop
nop
nop
nop
nop
nop
nop
nop
popal
jmp 0x431219
Function at 0x5e31a0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x129000]
push edi
jmp 0x5e31ba
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x5e31c1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x5e31b0
mov eax, 1
add ebx, ebx
jne 0x5e31d3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x5e31e4
jne 0x5e3203
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x5e3203
dec eax
add ebx, ebx
jne 0x5e31f0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x5e31c8
add ebx, ebx
jne 0x5e31ff
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x5e3255
xor ecx, ecx
sub eax, 3
jb 0x5e321b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x5e328a
sar eax, 1
mov ebp, eax
jmp 0x5e3226
add ebx, ebx
jne 0x5e3226
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x5e31f4
inc ecx
add ebx, ebx
jne 0x5e3234
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x5e31f4
add ebx, ebx
jne 0x5e3241
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x5e3236
jne 0x5e3252
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x5e3236
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x5e3274
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x5e3266
jmp 0x5e31b6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x5e3274
add edi, ecx
jmp 0x5e31b6
pop esi
mov edi, esi
mov ecx, 0x6681
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x5e3292
cmp byte [edi], 0x25
jne 0x5e3292
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x5e3297
lea edi, [esi + 0x1e0000]
mov eax, dword [edi]
or eax, eax
je 0x5e330f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x1e7d90]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x1e7ea8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x5e32c4
mov ecx, edi
jns 0x5e32f3
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x1e7eac]
or eax, eax
je 0x5e3309
mov dword [ebx], eax
add ebx, 4
jmp 0x5e32e1
call dword [esi + 0x1e7ebc]
mov ebp, dword [esi + 0x1e7eb0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x23f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x5e3343
sub esp, 0xffffff80
jmp 0x4be8f3
Function at 0x401000
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x14
push esi
lea eax, [esp + 4]
push eax
push 0x20
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401091
lea ecx, [esp + 0xc]
push ecx
push str.SeDebugPrivilege
push esi
mov dword [esp + 0x14], 1
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x401048
push str.Cant___lookup___privilege___value._n
call fcn.00401361
add esp, 4
mov eax, dword [esp + 4]
push 0
push 0
push 0x10
lea edx, [esp + 0x14]
push edx
push 0
push eax
mov dword [esp + 0x2c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x401079
push str.Cant___adjust___privilege___value._n
call fcn.00401361
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 4]
mov esi, eax
neg esi
sbb esi, esi
push ecx
inc esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
add esp, 0x14
ret

Function at 0x4010a0
Capabilities:
Create thread
Inject dll
Inject thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407208
push 0x40148c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], esi
call section..text
mov eax, dword [ebp + 8]
push eax
push esi
push 0x42a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp edi, esi
je 0x4011c4
push str..HookTcp.cpp
push 0x78
push str.InjectLibW_OpenProcess___d_____d____s__n
call fcn.00401360
add esp, 0xc
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
mov dword [ebp - 0x2c], eax
lea ebx, [eax + eax]
mov dword [ebp - 0x30], ebx
push 4
push 0x1000
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x4011c4
push 0
push ebx
mov edx, dword [ebp + 0xc]
push edx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4011c4
push str.LoadLibraryW
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
mov dword [ebp - 0x34], ebx
test ebx, ebx
je 0x4011c4
push str..HookTcp.cpp
push 0x8c
push 0x40718c
call fcn.00401360
add esp, 0xc
push 0
push 0
push esi
push ebx
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4011c4
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push str..HookTcp.cpp
push 0x96
push 0x407174
call fcn.00401360
add esp, 0xc
mov dword [ebp - 0x28], 1
mov dword [ebp - 4], 0xffffffff
call fcn.004011ec
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x40164f
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x407250
call fcn.004030d4
mov edi, 0x94
mov eax, edi
call fcn.00401590
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x4097f8], ecx
mov eax, dword [esi + 4]
mov dword [0x409804], eax
mov edx, dword [esi + 8]
mov dword [0x409808], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4097fc], esi
cmp ecx, 2
je 0x4016af
or esi, 0x8000
mov dword [0x4097fc], esi
shl eax, 8
add eax, edx
mov dword [0x409800], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4016ea
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4016ea
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x401702
cmp eax, 0x20b
je 0x4016ef
mov dword [ebp - 0x1c], esi
jmp 0x401716
cmp dword [ecx + 0x84], 0xe
jbe 0x4016ea
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x401710
cmp dword [ecx + 0x74], 0xe
jbe 0x4016ea
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00403081
pop ecx
test eax, eax
jne 0x401742
cmp dword [0x409790], 1
jne 0x40172f
call fcn.00402836
push 0x1c
call fcn.004026bf
push 0xff
call fcn.00402524
pop ecx
pop ecx
call fcn.00402fdf
mov dword [ebp - 4], esi
call fcn.00402e34
test eax, eax
jge 0x40175b
push 0x1b
call fcn.0040162a
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ad44], eax
call fcn.00402d12
mov dword [0x409788], eax
call fcn.00402c70
test eax, eax
jge 0x401781
push 8
call fcn.0040162a
pop ecx
call fcn.00402a3d
test eax, eax
jge 0x401792
push 9
call fcn.0040162a
pop ecx
push 1
call fcn.00402554
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4017a8
push eax
call fcn.0040162a
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004029e0
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4017c9
movzx eax, word [ebp - 0x40]
jmp 0x4017cc
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401270
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4017ea
push edi
call fcn.0040267f
call fcn.004026a1
jmp 0x40181c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040310f
ret
Function at 0x402231
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x40225f
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x402266
cmp ebx, dword [eax + 4]
jae 0x402266
xor eax, eax
jmp 0x402456
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x402277
xor eax, eax
inc eax
jmp 0x402455
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40228d
cmp ecx, edx
jae 0x4023d2
cmp dword [eax + 4], 0
je 0x402296
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40227e
cmp dword [ebp + 8], 0
je 0x4022b8
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x4023d2
cmp eax, esi
jae 0x4023d2
mov eax, dword [0x4097a0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4022dd
cmp dword [esi*4 + 0x4097a8], edi
je 0x4023d6
inc esi
cmp esi, eax
jl 0x4022cb
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x402452
cmp dword [ebp - 8], 0x1000000
jne 0x402452
test byte [ebp - 0xc], 0xcc
je 0x40235b
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x402452
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x402452
cmp word [eax + 0x18], 0x10b
jne 0x402452
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x402452
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40235b
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40235b
test byte [ecx + 0x27], 0x80
jne 0x4023d2
push 1
push 0x4097e8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40226f
mov ecx, dword [0x4097a0]
test ecx, ecx
mov edx, ecx
jle 0x40238f
lea eax, [ecx*4 + 0x4097a4]
cmp dword [eax], edi
je 0x40238f
dec edx
sub eax, 4
test edx, edx
jg 0x402383
test edx, edx
jne 0x4023c0
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40239c
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4023b4
lea eax, [edx*4 + 0x4097a8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4023a2
cmp ecx, 0x10
jge 0x4023c0
inc ecx
mov dword [0x4097a0], ecx
push 0
push 0x4097e8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40226f
xor eax, eax
jmp 0x402455
test esi, esi
jle 0x40226f
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4097e8
call ebx
test eax, eax
jne 0x40226f
cmp dword [esi*4 + 0x4097a8], edi
je 0x40242c
mov eax, dword [0x4097a0]
lea esi, [eax - 1]
test esi, esi
jl 0x40241a
cmp dword [esi*4 + 0x4097a8], edi
je 0x402416
dec esi
jns 0x40240a
test esi, esi
jge 0x40242a
cmp eax, 0x10
jge 0x402425
inc eax
mov dword [0x4097a0], eax
lea esi, [eax - 1]
jmp 0x40242c
je 0x402444
xor ecx, ecx
test esi, esi
jl 0x402444
lea eax, [ecx*4 + 0x4097a8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x402432
push 0
push 0x4097e8
call ebx
jmp 0x40226f
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret