joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4cf6e0
Capabilities:
Hash data using sha256

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
push ebx
mov ebx, 0x37
push edi
mov edi, edx
test ecx, ecx
jne 0x4cf6ff
pop edi
lea eax, [ebx - 0x36]
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, 0x1b8
mov byte [ebp - 1], 1
mov eax, ecx
mov dword [ebp - 8], 2
ror eax, 8
rol ecx, 8
and eax, 0xff00ff00
and ecx, 0xff00ff
or eax, ecx
mov dword [ebp - 0xc], eax
push esi
nop dword [eax + eax]
push 1
lea edx, [ebp - 1]
mov dword [ebp - 0x7c], 0x6a09e667
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x78], 0xbb67ae85
mov dword [ebp - 0x74], 0x3c6ef372
mov dword [ebp - 0x70], 0xa54ff53a
mov dword [ebp - 0x6c], 0x510e527f
mov dword [ebp - 0x68], 0x9b05688c
mov dword [ebp - 0x64], 0x1f83d9ab
mov dword [ebp - 0x60], 0x5be0cd19
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
call fcn.004c95d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4cf86d
inc byte [ebp - 1]
lea edx, [ebp - 0xc]
push 4
lea ecx, [ebp - 0x7c]
call fcn.004c95d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4cf86d
cmp byte [ebp + 0xc], 4
je 0x4cf7db
push 1
lea edx, [ebp + 0xc]
lea ecx, [ebp - 0x7c]
call fcn.004c95d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4cf86d
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x4cf7ee
cmp dword [ebp + 0x14], eax
jbe 0x4cf804
mov esi, 0xffffff53
jmp 0x4cf86d
push dword [ebp + 0x14]
mov edx, eax
lea ecx, [ebp - 0x7c]
call fcn.004c95d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4cf86d
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x4cf826
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x4cf826
mov edx, ecx
lea ecx, [ebp - 0x7c]
push eax
call fcn.004c95d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4cf86d
lea edx, [ebp - 0x9c]
lea ecx, [ebp - 0x7c]
call fcn.004c9e10
mov esi, eax
test esi, esi
jne 0x4cf86d
cmp ebx, 0x20
jbe 0x4cf85c
movups xmm0, xmmword [ebp - 0x9c]
sub ebx, 0x20
movups xmmword [edi], xmm0
movups xmm0, xmmword [ebp - 0x8c]
movups xmmword [edi + 0x10], xmm0
add edi, 0x20
jmp 0x4cf86d
push ebx
lea eax, [ebp - 0x9c]
push eax
push edi
call fcn.0041d170
add esp, 0xc
sub dword [ebp - 8], 1
jne 0x4cf730
mov eax, 0x20
lea ecx, [ebp - 0x9c]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x4cf882
test esi, esi
pop esi
pop edi
setne al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4cf8a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov eax, edx
xor esi, esi
mov edx, ecx
mov dword [ebp - 8], eax
push edi
mov edi, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 4], edx
test edi, edi
jle 0x4cf97d
push ebx
mov ebx, edx
sub ebx, eax
cmp edi, 8
jb 0x4cf959
mov esi, dword [ebp - 4]
mov edx, edi
and edx, 0xfffffff8
xorps xmm4, xmm4
xorps xmm3, xmm3
add eax, 4
movd xmm2, dword [ecx + esi]
lea eax, [eax + 8]
movd xmm1, dword [eax - 0xc]
xorps xmm0, xmm0
punpcklbw xmm2, xmm0
add ecx, 8
punpcklbw xmm1, xmm0
punpcklwd xmm2, xmm0
punpcklwd xmm1, xmm0
pxor xmm2, xmm1
movd xmm1, dword [eax - 8]
punpcklbw xmm1, xmm0
por xmm4, xmm2
movd xmm2, dword [ebx + eax - 8]
punpcklbw xmm2, xmm0
punpcklwd xmm2, xmm0
punpcklwd xmm1, xmm0
pxor xmm2, xmm1
por xmm3, xmm2
cmp ecx, edx
jl 0x4cf8e0
por xmm3, xmm4
movaps xmm0, xmm3
psrldq xmm0, 8
por xmm3, xmm0
movups xmm0, xmm3
psrldq xmm0, 4
por xmm3, xmm0
movd esi, xmm3
cmp ecx, edi
jge 0x4cf974
mov eax, dword [ebp - 8]
add eax, ecx
sub edi, ecx
nop dword [eax]
movzx edx, byte [ebx + eax]
lea eax, [eax + 1]
movzx ecx, byte [eax - 1]
xor edx, ecx
or esi, edx
sub edi, 1
jne 0x4cf960
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4d0460
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
test edi, edi
je 0x4d050e
test ebx, ebx
je 0x4d050e
mov esi, dword [ebp + 8]
cmp esi, 0x10
je 0x4d048e
cmp esi, 0x20
jne 0x4d050e
test bl, 3
je 0x4d04a4
push esi
lea eax, [ebp - 0x20]
push ebx
push eax
call fcn.0041d170
add esp, 0xc
lea ebx, [ebp - 0x20]
mov eax, dword [ebx]
lea ecx, [ebx + 0x10]
mov dword [edi + 0x10], eax
cmp esi, 0x20
mov eax, dword [ebx + 4]
mov edx, 0x50421c
mov dword [edi + 0x14], eax
cmovne ecx, ebx
mov eax, dword [ebx + 8]
mov dword [edi + 0x18], eax
mov eax, dword [ebx + 0xc]
mov dword [edi + 0x1c], eax
mov eax, str.expand_32_byte_kexpand_16_byte_k
cmove edx, eax
mov eax, dword [ecx]
mov dword [edi + 0x20], eax
mov eax, dword [ecx + 4]
mov dword [edi + 0x24], eax
mov eax, dword [ecx + 8]
mov dword [edi + 0x28], eax
mov eax, dword [ecx + 0xc]
mov dword [edi + 0x2c], eax
mov eax, dword [edx]
mov dword [edi], eax
mov eax, dword [edx + 4]
mov dword [edi + 4], eax
mov eax, dword [edx + 8]
mov dword [edi + 8], eax
mov eax, dword [edx + 0xc]
mov dword [edi + 0xc], eax
xor eax, eax
mov dword [edi + 0x40], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffff53
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4d2e10
Capabilities:
Enumerate pe sections

Disassembly:
push esi
mov esi, edx
push edi
mov edi, ecx
test esi, esi
je 0x4d2fae
test edi, edi
je 0x4d2fae
movzx edx, byte [esi + 3]
movzx eax, byte [esi + 2]
and edx, 3
shl edx, 8
or edx, eax
movzx eax, byte [esi + 1]
shl edx, 8
or edx, eax
movzx eax, byte [esi]
shl edx, 8
or edx, eax
mov dword [edi], edx
movzx ecx, byte [esi + 6]
movzx eax, byte [esi + 5]
and ecx, 0xf
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 4]
shl ecx, 8
and eax, 0xfc
or ecx, eax
movzx eax, byte [esi + 3]
shl ecx, 6
shr eax, 2
and eax, 3
or ecx, eax
mov dword [edi + 4], ecx
movzx ecx, byte [esi + 9]
movzx eax, byte [esi + 8]
and ecx, 0x3f
shl ecx, 8
and eax, 0xfc
or ecx, eax
movzx eax, byte [esi + 7]
shl ecx, 8
and eax, 0xf
or ecx, eax
movzx eax, byte [esi + 6]
shl ecx, 4
shr eax, 4
or ecx, eax
mov dword [edi + 8], ecx
movzx ecx, byte [esi + 0xc]
movzx eax, byte [esi + 0xb]
and ecx, 0xfc
shl ecx, 8
and eax, 0xf
or ecx, eax
movzx eax, byte [esi + 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 9]
shl ecx, 2
shr eax, 6
or ecx, eax
mov dword [edi + 0xc], ecx
movzx ecx, byte [esi + 0xf]
movzx eax, byte [esi + 0xe]
and ecx, 0xf
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xd]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], ecx
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
movzx ecx, byte [esi + 0x13]
movzx eax, byte [esi + 0x12]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x11]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x10]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x28], ecx
movzx ecx, byte [esi + 0x17]
movzx eax, byte [esi + 0x16]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x15]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x14]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x2c], ecx
movzx ecx, byte [esi + 0x1b]
movzx eax, byte [esi + 0x1a]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x19]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x18]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x30], ecx
movzx ecx, byte [esi + 0x1f]
movzx eax, byte [esi + 0x1e]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x1d]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x1c]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x38], 0
mov dword [edi + 0x34], ecx
xor eax, eax
mov byte [edi + 0x4c], 0
pop edi
pop esi
ret
pop edi
mov eax, 0xffffff53
pop esi
ret

Function at 0x4ee6c0
Capabilities:
Encode data using xor

Disassembly:
mov eax, ecx
or eax, edx
test al, 3
jne 0x4ee6e0
push esi
sub edx, ecx
mov esi, 2
mov eax, dword [edx + ecx]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
sub esi, 1
jne 0x4ee6d0
pop esi
ret
movzx eax, byte [edx]
xor byte [ecx], al
movzx eax, byte [edx + 1]
xor byte [ecx + 1], al
movzx eax, byte [edx + 2]
xor byte [ecx + 2], al
movzx eax, byte [edx + 3]
xor byte [ecx + 3], al
movzx eax, byte [edx + 4]
xor byte [ecx + 4], al
movzx eax, byte [edx + 5]
xor byte [ecx + 5], al
movzx eax, byte [edx + 6]
xor byte [ecx + 6], al
movzx eax, byte [edx + 7]
xor byte [ecx + 7], al
ret
Function at 0x4ee800
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov dword [ebp - 4], esi
test esi, esi
je 0x4ee97f
test edx, edx
je 0x4ee97f
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x4ee974
cmp edi, 0x80
ja 0x4ee974
push ebx
push edi
push edx
push esi
mov dword [esi + 0x90], edi
mov dword [esi + 0x94], 0x28
call fcn.0041d170
add esp, 0xc
cmp edi, 0x80
jge 0x4ee88f
lea edx, [edi - 1]
mov ebx, 0x80
add edx, esi
mov esi, 1
sub esi, edi
sub ebx, edi
mov al, byte [edx]
nop dword [eax + eax]
movzx ecx, byte [esi + edx]
lea edx, [edx + 1]
movzx eax, al
add ecx, eax
movzx eax, cl
mov al, byte [eax + 0x508c90]
mov byte [edx], al
sub ebx, 1
jne 0x4ee870
mov esi, dword [ebp - 4]
movzx ecx, byte [esi + 0x7b]
lea eax, [esi + 0x7b]
mov edi, 0x29
mov cl, byte [ecx + 0x508c90]
mov byte [eax], cl
movzx edx, byte [eax + 4]
lea eax, [eax - 3]
movzx ecx, cl
xor edx, ecx
mov cl, byte [edx + 0x508c90]
mov byte [eax + 2], cl
movzx edx, byte [eax + 6]
movzx ecx, cl
xor edx, ecx
mov cl, byte [edx + 0x508c90]
mov byte [eax + 1], cl
movzx edx, byte [eax + 5]
movzx ecx, cl
xor edx, ecx
mov cl, byte [edx + 0x508c90]
mov byte [eax], cl
sub edi, 1
jne 0x4ee8a3
lea edx, [esi + 2]
mov edi, 0x10
mov ebx, 0x100
nop dword [eax]
movzx ecx, byte [edx - 1]
lea edx, [edx + 8]
movzx eax, byte [edx - 0xa]
imul ecx, ebx
add cx, ax
mov word [edx - 0xa], cx
movzx ecx, byte [edx - 7]
movzx eax, byte [edx - 8]
imul ecx, ebx
add cx, ax
mov word [edx - 8], cx
movzx ecx, byte [edx - 5]
movzx eax, byte [edx - 6]
imul ecx, ebx
add cx, ax
mov word [edx - 6], cx
movzx ecx, byte [edx - 3]
movzx eax, byte [edx - 4]
imul ecx, ebx
add cx, ax
mov word [edx - 4], cx
sub edi, 1
jne 0x4ee8f0
mov ecx, dword [ebp + 0xc]
pop ebx
test ecx, ecx
je 0x4ee961
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [esi + 0x80], eax
xor eax, eax
pop edi
mov dword [esi + 0x84], ecx
pop esi
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
xor eax, eax
pop edi
movq qword [esi + 0x80], xmm0
pop esi
mov esp, ebp
pop ebp
ret
pop edi
mov eax, 0xffffff16
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 0xffffff53
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x401400
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov eax, dword [edi]
lea ecx, [esp]
push ecx
mov ecx, dword [esp + 0xc]
push esi
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x18]
push 0
mov dword [edi], 0
mov edx, dword [ecx]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401459
mov eax, dword [esp + 0xc]
cmp eax, 1
je 0x40143d
cmp eax, 2
jne 0x40144c
test esi, esi
mov eax, dword [esp]
je 0x401455
mov cl, byte [eax + esi - 1]
test cl, cl
je 0x401455
mov eax, 0xd
pop ecx
ret 8
mov dword [edi], eax
xor eax, eax
pop ecx
ret 8

Function at 0x401e20
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401e39
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x401e4d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x401e6e
cmp esi, eax
jae 0x401e47
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401e60
cmp esi, eax
jae 0x401e47
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x4031a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x4031f3
call fcn.00426fb9
mov edi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x4031f3
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x4031e9
xor eax, eax
jmp 0x40330c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x403223
mov eax, dword [esi]
push edi
push dword [ebp - 4]
mov ecx, esi
push ebx
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x403223
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x403309
mov ecx, dword [eax + 0x40]
and dword [ebp + 0xc], 0
test ecx, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 8], ecx
je 0x403250
lea ecx, [eax + 0x3c]
lea eax, [ebp + 8]
push eax
call fcn.0040236f
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [edi + 8], eax
mov dword [ebp - 4], eax
jbe 0x403309
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x403299
mov ecx, dword [ecx + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x403299
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 8], eax
je 0x403293
mov ecx, dword [ebx + 0x48]
lea eax, [ebp + 8]
add ecx, 0x3c
push eax
call fcn.0040236f
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x4032f9
and dword [ebp + 0xc], 0
jmp 0x4032f9
mov ecx, dword [edi + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x4032f9
push 0xc
call fcn.00420b44
mov esi, eax
test esi, esi
pop ecx
je 0x4032db
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x1c]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0x10]
mov dword [esi], eax
jmp 0x4032dd
xor esi, esi
mov ecx, dword [ebx + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x4032f4
push dword [ebp - 8]
call fcn.0041c5f5
jmp 0x4032f9
call fcn.0041c5cc
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [edi + 8]
mov dword [ebp - 4], eax
jb 0x40325e
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40bbab
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040d620
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40bc46
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x439fec]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40bc46
cmp eax, 1
je 0x40bc67
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40bc46
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40bc13
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40bc42
xor eax, eax
inc eax
jmp 0x40bc86
cmp edi, eax
jae 0x40bc4a
xor eax, eax
jmp 0x40bc86
cmp eax, esi
jae 0x40bc51
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x439fec]
jmp 0x40bc6a
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40cb38
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x42de78
call fcn.0040e064
mov edi, 0x94
mov eax, edi
call fcn.0040d620
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 [0x439fec], ecx
mov eax, dword [esi + 4]
mov dword [0x439ff8], eax
mov edx, dword [esi + 8]
mov dword [0x439ffc], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x439ff0], esi
cmp ecx, 2
je 0x40cb98
or esi, 0x8000
mov dword [0x439ff0], esi
shl eax, 8
add eax, edx
mov dword [0x439ff4], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40cbd3
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40cbd3
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40cbeb
cmp eax, 0x20b
je 0x40cbd8
mov dword [ebp - 0x1c], esi
jmp 0x40cbff
cmp dword [ecx + 0x84], 0xe
jbe 0x40cbd3
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40cbf9
cmp dword [ecx + 0x74], 0xe
jbe 0x40cbd3
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040ee1d
pop ecx
test eax, eax
jne 0x40cc13
push 0x1c
call fcn.0040cb14
pop ecx
call fcn.004107f2
test eax, eax
jne 0x40cc24
push 0x10
call fcn.0040cb14
pop ecx
call fcn.00412b85
mov dword [ebp - 4], esi
call fcn.00412987
test eax, eax
jge 0x40cc3d
push 0x1b
call fcn.0040caef
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x43bb50], eax
call fcn.00412865
mov dword [0x439fd8], eax
call fcn.004127c3
test eax, eax
jge 0x40cc63
push 8
call fcn.0040caef
pop ecx
call fcn.00412590
test eax, eax
jge 0x40cc74
push 9
call fcn.0040caef
pop ecx
push 1
call fcn.0040d8c9
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40cc8a
push eax
call fcn.0040caef
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00412533
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40ccab
movzx eax, word [ebp - 0x40]
jmp 0x40ccae
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00418a80
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40cccc
push edi
call fcn.0040d9f6
call fcn.0040da18
jmp 0x40ccfe
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040e09f
ret
Function at 0x40d933
Capabilities:
Terminate process

Disassembly:
push 8
push 0x42dee8
call fcn.0040e064
push 8
call fcn.0040efc1
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x43a02c], esi
jne 0x40d967
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x43a028], esi
mov al, byte [ebp + 0x10]
mov byte [0x43a024], al
cmp dword [ebp + 0xc], edi
jne 0x40d9b1
cmp dword [0x43bb48], edi
je 0x40d9a1
mov eax, dword [0x43bb44]
sub eax, 4
mov dword [0x43bb44], eax
cmp eax, dword [0x43bb48]
jb 0x40d9a1
mov eax, dword [eax]
cmp eax, edi
je 0x40d982
call eax
jmp 0x40d982
push 0x436098
mov eax, 0x436090
call fcn.0040d8b1
pop ecx
push 0x4360a4
mov eax, 0x43609c
call fcn.0040d8b1
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40d9e2
cmp dword [ebp + 0x10], edi
jne 0x40d9f0
mov dword [0x43a02c], esi
push dword [ebp + 8]
call fcn.0040d86f
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40d9ef
push 8
call fcn.0040ef0c
pop ecx
ret
call fcn.0040e09f
ret
Function at 0x411e20
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x437118]
xor ecx, ecx
xor eax, ebp
cmp dword [ebp + 0x3b4], ecx
push edi
mov edi, dword [ebp + 0x3b0]
mov dword [ebp + 0x3a0], eax
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], ecx
jne 0x411e5c
xor eax, eax
jmp 0x411fc6
mov eax, dword [ebp + 0x3ac]
push ebx
mov ebx, dword [ebp + 0x3ac]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x43a7c0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x411e9a
push 2
push ecx
push ecx
push dword [ebp + 0x3ac]
call fcn.004161da
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x411f34
cmp dword [ebp + 0x3b4], ecx
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x68], ecx
jbe 0x411f97
jmp 0x411ebe
xor ecx, ecx
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x64]
cmp ecx, dword [ebp + 0x3b4]
jae 0x411ef9
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x411eea
inc dword [ebp - 0x78]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x6c]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x6c]
cmp dword [ebp - 0x6c], 0x400
jl 0x411eca
mov edi, eax
lea eax, [ebp - 0x64]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411f58
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x411f61
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x7c]
cmp eax, dword [ebp + 0x3b4]
jb 0x411ebc
jmp 0x411f61
push ecx
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b4]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411f58
mov eax, dword [ebp - 0x80]
and dword [ebp - 0x68], 0
mov dword [ebp - 0x74], eax
jmp 0x411f61
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x74]
test eax, eax
jne 0x411fc1
cmp dword [ebp - 0x68], eax
je 0x411f94
push 5
pop esi
cmp dword [ebp - 0x68], esi
jne 0x411f89
call fcn.0040ea4a
mov dword [eax], 9
call fcn.0040ea53
mov dword [eax], esi
jmp 0x411fbc
push dword [ebp - 0x68]
call fcn.0040ea5c
pop ecx
jmp 0x411fbc
mov edi, dword [ebp - 0x7c]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x411fa9
cmp byte [edi], 0x1a
jne 0x411fa9
xor eax, eax
jmp 0x411fc4
call fcn.0040ea4a
mov dword [eax], 0x1c
call fcn.0040ea53
and dword [eax], 0
or eax, 0xffffffff
jmp 0x411fc4
sub eax, dword [ebp - 0x78]
pop esi
pop ebx
mov ecx, dword [ebp + 0x3a0]
xor ecx, ebp
pop edi
call fcn.0040cd3e
add ebp, 0x3a4
leave
ret
Function at 0x41221e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x437118]
mov ecx, dword [ebp + 0x98]
push ebx
xor eax, ebp
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4379d0]
je 0x412255
inc eax
cmp eax, 0x13
jb 0x412246
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4379d0]
jne 0x412378
mov eax, dword [0x439fe0]
cmp eax, 1
je 0x412353
cmp eax, edx
jne 0x412285
cmp dword [0x437114], 1
je 0x412353
cmp ecx, 0xfc
je 0x412378
push 0x104
lea eax, [ebp - 0x7c]
push eax
push edx
mov byte [ebp + 0x88], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4122bb
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.00414660
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.0040d660
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4122ef
mov eax, edi
push eax
call fcn.0040d660
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x42e678
push edi
call fcn.004104f0
add esp, 0x10
push edi
call fcn.0040d660
push dword [esi + 0x4379d4]
mov ebx, eax
call fcn.0040d660
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040d620
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00414660
push edi
push ebx
call fcn.00414670
push 0x42e658
push ebx
call fcn.00414670
push dword [esi + 0x4379d4]
push ebx
call fcn.00414670
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0041625d
add esp, 0x2c
jmp 0x412378
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x4379d4]
push dword [esi]
call fcn.0040d660
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x8c]
xor ecx, ebp
call fcn.0040cd3e
add ebp, 0x90
leave
ret