joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402bc0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push 0x1000
push 0
push dword [0x41e9f4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 8], edx
test edx, edx
je 0x402d7f
mov ax, word [esp + 0x1c]
push ebp
push esi
push edi
mov edi, edx
mov dword [esp + 0x1c], 0x1000
mov dword [esp + 0x18], 0x7ff
mov ecx, dword [esp + 0x30]
cmp ecx, 0xffffffff
je 0x402c19
test ecx, ecx
je 0x402cdc
dec ecx
mov dword [esp + 0x30], ecx
cmp dword [ebx + 4], 0
lea ebp, [ebx + 4]
je 0x402c35
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.00406af0
mov dword [esp + 0x10], eax
jmp 0x402c4f
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
cmp eax, 2
mov ax, word [esp + 0x28]
jne 0x402cdf
test ax, ax
je 0x402c6d
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x28]
mov edx, dword [esp + 0x14]
mov esi, edi
mov ecx, dword [esp + 0x18]
sub esi, edx
sar esi, 1
cmp esi, ecx
jle 0x402cb4
mov eax, dword [esp + 0x1c]
add ecx, 0x800
add eax, 0x1000
mov dword [esp + 0x18], ecx
push eax
push edx
push 8
push dword [0x41e9f4]
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
mov ax, word [esp + 0x28]
mov dword [esp + 0x14], edx
lea edi, [edx + esi*2]
test ax, ax
je 0x402cdf
cmp dword [esp + 0x2c], 0
jne 0x402c03
cmp ax, 0xd
je 0x402ce6
cmp ax, 0xa
jne 0x402c03
sub edi, 2
jmp 0x402d5e
lea ebp, [ebx + 4]
cmp dword [esp + 0x2c], 0
jne 0x402d5e
cmp ax, 0xa
jne 0x402cf1
sub edi, 2
jmp 0x402d5e
cmp ax, 0xd
jne 0x402d5e
sub edi, 2
cmp dword [ebp], 0
je 0x402d13
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.00406af0
mov dword [esp + 0x10], eax
jmp 0x402d29
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x28], 0xa
je 0x402d5e
cmp dword [ebp], 0
je 0x402d3d
add dword [ebx + 0xc], 2
jmp 0x402d5e
push 1
lea eax, [esp + 0x24]
mov dword [esp + 0x20], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, edi
sub ecx, dword [esp + 0x14]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
pop ebx
add esp, 0x14
ret 0x10
Function at 0x402d90
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x41e9f4]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x402ee0
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x402ddc
test edi, edi
je 0x402e4d
dec edi
push esi
push ebp
call fcn.00406c20
mov dword [esp + 0x20], eax
test eax, eax
jne 0x402def
xor cl, cl
jmp 0x402df1
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x402e34
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x41e9f4]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x402e4d
test eax, eax
jne 0x402dd2
cmp cl, 0xd
je 0x402e51
cmp cl, 0xa
jne 0x402dd2
dec esi
jmp 0x402ec3
test eax, eax
jne 0x402ec3
cmp cl, 0xa
jne 0x402e59
dec esi
jmp 0x402ec3
cmp cl, 0xd
jne 0x402ec3
dec esi
cmp dword [ebp + 4], 0
je 0x402e78
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.00406af0
mov dword [esp + 0x20], eax
jmp 0x402e8f
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x402ec3
cmp dword [ebp + 4], 0
je 0x402ea1
inc dword [ebp + 0xc]
jmp 0x402ec3
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x402ef0
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x10], 0
cmp dword [edi + 0x1c], 0
jne 0x403007
cmp dword [edi + 0x14], 1
push ebx
push ebp
jne 0x402f3d
mov eax, dword [edi + 0xc]
lea ecx, [esp + 0x10]
push 1
neg eax
cdq
push ecx
push eax
push dword [edi]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0xc], eax
mov eax, dword [edi + 0xc]
push esi
mov esi, dword [esp + 0x24]
cmp eax, esi
jle 0x402fc6
mov ecx, dword [edi + 4]
sub ecx, eax
mov eax, esi
add ecx, dword [edi + 8]
sub eax, 1
je 0x402faf
sub eax, 1
je 0x402f96
sub eax, 2
je 0x402f7f
push esi
push dword [esp + 0x24]
push ecx
call fcn.00406d20
add esp, 0xc
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov ax, word [eax]
mov word [ecx], ax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov al, byte [eax]
mov byte [ecx], al
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
push edi
call fcn.00401760
mov eax, dword [edi + 8]
cmp esi, eax
jl 0x402ff5
push 0
lea eax, [esp + 0x20]
push eax
push esi
push dword [esp + 0x2c]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov ecx, dword [edi + 4]
sub ecx, dword [edi + 0xc]
push esi
push dword [esp + 0x24]
add ecx, eax
jmp 0x402f67
xor eax, eax
pop edi
add esp, 8
ret 0xc
Function at 0x40334c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x14], edi
je 0x4033aa
add ebx, 2
lea eax, [ebx*2 + 2]
push eax
push edi
push dword [0x41e9f4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x4033aa
cmp dword [ebp + 0xc], 0
je 0x403399
push dword [ebp + 0xc]
push edi
call fcn.004072c5
push 0x41cc20
push edi
call fcn.00407294
add esp, 0x10
jmp 0x4033a6
push 0x41cc20
push edi
call fcn.004072c5
pop ecx
pop ecx
mov esi, edi
jmp 0x4033ad
mov esi, dword [ebp + 0xc]
push 0
lea eax, [ebp + 0x10]
push eax
push ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x403416
mov eax, dword [0x41e140]
dec eax
sub eax, 1
je 0x4033f0
sub eax, 0x16
je 0x4033e8
push 0
lea eax, [ebp + 0x10]
push eax
lea eax, [ebx + ebx]
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x403416
push esi
call fcn.00402820
jmp 0x4033f6
push esi
call fcn.00402930
mov esi, eax
lea eax, [ebp + 0x10]
push 0
push eax
push esi
call fcn.004072f0
pop ecx
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call fcn.004028b0
test edi, edi
je 0x403429
push edi
push 0
push dword [0x41e9f4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x404773
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4170c0
push 0x4170b8
push str.FlsAlloc
push 0x1f
call fcn.00404b8a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4047a7
push dword [ebp + 8]
mov ecx, esi
call dword [0x41cee8]
call esi
jmp 0x4047ad
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4047f1
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4170d0
push 0x4170c8
push str.FlsGetValue
push 0x21
call fcn.00404b8a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x404828
push dword [ebp + 8]
mov ecx, esi
call dword [0x41cee8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x404830
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4170d8
push 0x4170d0
push str.FlsSetValue
push 0x22
call fcn.00404b8a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40486a
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41cee8]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x406af0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
cmp dword [ebx + 0x14], 0
jne 0x406b12
push ebx
call fcn.00401760
mov dword [ebx + 0x14], 1
mov dword [ebx + 0xc], 0
mov ebp, dword [ebx + 0xc]
mov ecx, dword [ebx + 4]
mov esi, dword [esp + 0x1c]
sub ecx, ebp
add ecx, dword [ebx + 0x10]
cmp ebp, esi
jl 0x406b8e
mov eax, esi
sub eax, 1
je 0x406b7a
sub eax, 1
je 0x406b64
sub eax, 2
je 0x406b50
push esi
push ecx
push dword [esp + 0x20]
call fcn.00406d20
add esp, 0xc
mov eax, esi
sub dword [ebx + 0xc], esi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [ecx]
pop edi
mov dword [eax], ecx
mov eax, esi
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
mov cx, word [ecx]
pop edi
mov word [eax], cx
mov eax, esi
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov dl, byte [ecx]
mov eax, esi
mov ecx, dword [esp + 0x18]
pop edi
mov byte [ecx], dl
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
push ebp
push ecx
push eax
call fcn.00406d20
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [ebx + 8]
add eax, ebp
mov ecx, dword [ebx]
sub esi, ebp
mov dword [esp + 0x18], eax
push 0
cmp esi, edx
jl 0x406bd6
lea edx, [esp + 0x18]
push edx
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop edi
pop esi
add eax, ebp
mov dword [ebx + 0xc], 0
pop ebp
pop ebx
ret 0xc
lea eax, [esp + 0x18]
push eax
push edx
push dword [ebx + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], eax
cmp esi, eax
jle 0x406bf6
mov esi, eax
mov eax, dword [esp + 0x18]
push esi
push dword [ebx + 4]
push eax
call fcn.00406d20
sub dword [ebx + 0xc], esi
lea eax, [esi + ebp]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x406c20
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 4], 0
je 0x406c47
push 1
lea eax, [esp + 0x10]
push eax
push esi
call fcn.00406af0
mov dword [esp + 4], eax
jmp 0x406c61
push 0
lea eax, [esp + 8]
push eax
push 1
lea eax, [esp + 0x18]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 4]
cmp eax, 1
jne 0x406d18
mov cl, byte [esp + 0xc]
test cl, cl
js 0x406c86
mov eax, dword [esp + 0x10]
pop esi
mov byte [eax], cl
mov byte [eax + 1], 0
mov eax, 1
pop ecx
ret 8
mov al, cl
and al, 0xe0
push edi
cmp al, 0xc0
jne 0x406c96
mov edi, 2
jmp 0x406cb2
mov al, cl
and al, 0xf0
cmp al, 0xe0
jne 0x406ca5
mov edi, 3
jmp 0x406cb2
mov al, cl
and al, 0xf8
cmp al, 0xf0
jne 0x406d04
mov edi, 4
mov eax, dword [esp + 0x14]
push ebx
lea ebx, [edi - 1]
mov byte [eax], cl
inc eax
cmp dword [esi + 4], 0
je 0x406cde
push ebx
push eax
push esi
call fcn.00406af0
mov ecx, eax
xor eax, eax
cmp ecx, ebx
pop ebx
setne al
dec eax
and eax, edi
pop edi
pop esi
pop ecx
ret 8
push 0
lea ecx, [esp + 0x10]
push ecx
push ebx
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0xc]
xor eax, eax
cmp ecx, ebx
pop ebx
setne al
dec eax
and eax, edi
pop edi
pop esi
pop ecx
ret 8
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov word [eax], 0x3f
mov eax, 1
pop ecx
ret 8
xor eax, eax
pop esi
pop ecx
ret 8

Function at 0x4073c7
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x407406
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x407406
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407406
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x407406
cmp dword [ecx + 0x74], 0xe
jbe 0x407406
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x40ab52
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x41e234]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.00403fd6
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00403fd6
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x40abc9
cmp word [ecx], dx
je 0x40abc9
mov eax, dword [0x418f94]
push edi
dec eax
push eax
push 0x418e80
call fcn.0040ad42
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x40ac3c
cmp word [eax], dx
je 0x40ac3c
mov eax, dword [edi]
test eax, eax
je 0x40abed
cmp word [eax], dx
je 0x40abed
lea eax, [ebp - 0x10]
push eax
call fcn.0040ada3
jmp 0x40abf6
lea eax, [ebp - 0x10]
push eax
call fcn.0040b091
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x40ac66
mov eax, dword [0x418e7c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x418b70
call fcn.0040ad42
add esp, 0xc
test al, al
je 0x40ac66
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x40ac31
cmp word [eax], di
je 0x40ac31
lea eax, [ebp - 0x10]
push eax
call fcn.0040ada3
pop ecx
jmp 0x40ac68
lea eax, [ebp - 0x10]
push eax
call fcn.0040b091
jmp 0x40ac2e
mov eax, dword [edi]
test eax, eax
je 0x40ac53
cmp word [eax], dx
je 0x40ac53
lea eax, [ebp - 0x10]
push eax
call fcn.0040b1c5
pop ecx
jmp 0x40ac66
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x40ad31
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0040b2b7
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x40ad31
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x40ad31
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x40ad31
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40acbe
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.004049cd
test ebx, ebx
je 0x40ad2c
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.004049cd
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40ad31
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40ad31
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.0040edbc
add esp, 0x10
xor eax, eax
inc eax
jmp 0x40ad33
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040758b
leave
ret
Function at 0x40b3bd
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.00403fd6
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40b42c
cmp esi, dword [ebp - 4]
je 0x40b427
cmp dword [ebp + 0xc], 0
je 0x40b427
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40b404
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0040b486
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x40b42e
xor eax, eax
inc eax
jmp 0x40b42e
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x40cb30
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40cb5d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40cb5d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x415ad3
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x415b70
push ebx
push esi
call fcn.00415b73
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00407c86
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x415b1d
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x415b6f
push edi
push eax
call fcn.0040384f
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x415b3d
call fcn.00403815
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x415b6e
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00407c86
add esp, 0x20
test eax, eax
jne 0x415b5c
push edi
call fcn.00403815
jmp 0x415b64
push ebx
call fcn.00403815
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x430006
Capabilities:
Encode data using xor

Disassembly:
mov eax, section..text
nop
nop
mov ebx, 0x408f6c
mov ecx, 0x275867d7
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x430024
nop
nop
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42e3d0
mov ecx, 0x72ba5f4b
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x430084
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
popal
nop
nop
nop
jmp 0x401219
Function at 0x404a88
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004076f8
test esi, esi
jne 0x404abe
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00407880
jmp 0x404adc
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040496c
mov edi, eax
test esi, esi
je 0x404adc
cmp dword [ebx], 0
je 0x404adc
dec esi
jmp 0x404ac5
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x5bb008], 0x8088405
inc edx
mov dword [ebx + 0x5bb008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x40641c
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00406814
mov byte [esp], al
cmp byte [esp], 0
jne 0x4065a8
test edi, edi
je 0x4065a8
mov byte [esp + 1], 0
test ebp, ebp
jle 0x4064df
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
test ebp, ebp
jle 0x4064ba
cmp edi, 0xffffffff
je 0x40647b
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x40647b
mov byte [esp], 0
jmp 0x4065a8
mov ebx, dword [esi]
cmp ebx, 1
jg 0x4064ba
test ebx, ebx
jne 0x4064b0
mov eax, esi
xor ecx, ecx
mov edx, 1
call fcn.004028e4
test eax, eax
jne 0x4064b0
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x4065a8
call 0x406938
dec ebp
test ebp, ebp
jg 0x406460
cmp edi, 0xffffffff
je 0x4064df
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x4064dd
mov byte [esp], 0
jmp 0x4065a8
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x40642a
lea edx, [ebx + 2]
mov eax, esi
mov ecx, ebx
call fcn.004028e4
cmp ebx, eax
jne 0x4064df
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00406618
mov edx, eax
mov ebx, dword [0x5c38f8]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x406546
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x406544
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x406546
xor edi, edi
cmp byte [esp], 0
je 0x40656f
mov ebx, dword [esi]
test bl, 1
jne 0x406588
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, esi
mov ecx, ebx
call fcn.004028e4
cmp ebx, eax
jne 0x40654c
mov byte [esp + 1], 1
jmp 0x406588
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, esi
mov ecx, ebx
call fcn.004028e4
cmp ebx, eax
jne 0x40656f
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x4064f9
cmp byte [esp], 0
je 0x4065a8
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x407354
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x5c3058], 0
je 0x4073bb
cmp word [0x5c3344], 0xd7b2
jne 0x40737d
cmp dword [0x5c334c], 0
jbe 0x40737d
mov eax, 0x5c3340
call dword [0x5c335c]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
mov eax, 0x4073e8
call fcn.00408048
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x5bb034], 0
jne 0x4073d7
push 0
push 0x5bb9ca
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x4075b4
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x10]
cmp dword [0x5bb038], 0
je 0x4075df
mov edx, edi
mov eax, esi
call dword [0x5bb038]
mov ebx, eax
jmp 0x4075f0
mov eax, 8
call fcn.004046a8
mov ebx, eax
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov byte [0x5c3059], 1
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov eax, 0x40757c
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateThread
mov esi, eax
test esi, esi
jne 0x407625
mov edx, 8
mov eax, ebx
call fcn.004046c4
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0xc