joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4877a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], 0
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x71a]
test ecx, ecx
je 0x487865
mov edx, dword [ebp + 8]
cmp dword [edx + 0x1b0], 0
je 0x487814
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.00471620
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14c]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x1b0]
call edx
add esp, 0x14
mov dword [ebp - 8], eax
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.00471620
add esp, 8
jmp 0x487865
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
jl 0x487865
cmp dword [ebp - 4], 2
jle 0x487828
jmp 0x487865
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x148]
push eax
push 1
push 2
imul ecx, dword [ebp + 0xc], 3
add ecx, 0x62e0b8
push ecx
call fcn.00601b3f
add esp, 0x10
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x148]
push eax
push 1
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call fcn.00601b3f
add esp, 0x10
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x487b50
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push 0
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x487bd0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x2733
jne 0x487b8e
mov dword [ebp - 8], 1
jmp 0x487b95
mov dword [ebp - 8], 0
cmp dword [ebp - 8], 0
jne 0x487ba4
mov dword [ebp - 0xc], 0
jmp 0x487bab
mov dword [ebp - 0xc], 1
mov al, byte [ebp - 0xc]
mov byte [ebp - 1], al
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
movzx edx, byte [ebp - 1]
test edx, edx
je 0x487bc9
mov eax, 0x51
jmp 0x487bda
mov eax, 0x38
jmp 0x487bda
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x518fe0
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
xor esi, esi
test edi, edi
je 0x519039
mov al, byte [edi]
test al, al
je 0x519039
push ebx
mov ebx, 0x100
jmp 0x519000
movsx eax, al
push eax
call fcn.004f1fb0
or eax, ebx
lea edi, [edi + 1]
mov ecx, eax
add esp, 4
shr ecx, 2
add ebx, 0x100
xor ecx, eax
imul eax, eax
and ecx, 0xf
rol esi, cl
xor esi, eax
mov al, byte [edi]
test al, al
jne 0x519000
mov eax, esi
pop ebx
shr eax, 0x10
pop edi
xor eax, esi
pop esi
ret
pop edi
xor eax, eax
pop esi
ret

Function at 0x5435e0
Capabilities:
Encode data using base64

Disassembly:
mov eax, dword [esp + 4]
push ebx
push ebp
xor ebp, ebp
push esi
test eax, eax
je 0x5435f8
test byte [eax + 0x5c], 2
mov ebx, str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._
jne 0x5435fd
mov ebx, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
test esi, esi
jle 0x5436c2
push edi
mov edi, dword [esp + 0x1c]
inc edi
movzx edx, byte [edi - 1]
cmp esi, 3
jl 0x543665
movzx ecx, byte [edi]
shl edx, 8
or edx, ecx
movzx ecx, byte [edi + 1]
shl edx, 8
or edx, ecx
mov ecx, edx
shr ecx, 0x12
and ecx, 0x3f
movzx ecx, byte [ecx + ebx]
mov byte [eax], cl
mov ecx, edx
shr ecx, 0xc
and ecx, 0x3f
movzx ecx, byte [ecx + ebx]
mov byte [eax + 1], cl
mov ecx, edx
shr ecx, 6
and ecx, 0x3f
and edx, 0x3f
movzx ecx, byte [ecx + ebx]
mov byte [eax + 2], cl
movzx ecx, byte [edx + ebx]
mov byte [eax + 3], cl
jmp 0x5436ad
shl edx, 0x10
cmp esi, 2
jne 0x543675
movzx ecx, byte [edi]
shl ecx, 8
or edx, ecx
mov ecx, edx
shr ecx, 0x12
and ecx, 0x3f
movzx ecx, byte [ecx + ebx]
mov byte [eax], cl
mov ecx, edx
shr ecx, 0xc
and ecx, 0x3f
movzx ecx, byte [ecx + ebx]
mov byte [eax + 1], cl
cmp esi, 1
jne 0x54369c
lea ecx, [esi + 0x3c]
jmp 0x5436a6
shr edx, 6
and edx, 0x3f
movzx ecx, byte [edx + ebx]
mov byte [eax + 2], cl
mov byte [eax + 3], 0x3d
sub esi, 3
add eax, 4
add ebp, 4
add edi, 3
test esi, esi
jg 0x543613
pop edi
pop esi
mov byte [eax], 0
mov eax, ebp
pop ebp
pop ebx
ret
Function at 0x5deadd
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret

Function at 0x610108
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0060ff7e

Function at 0x614eb0
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00614a03

Function at 0x433003
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
call 0x43300c
nop
nop
pop eax
nop
nop
nop
add eax, 0x40a063
nop
nop
sub eax, 0x40a009
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x433030
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x100010d0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x214
mov eax, dword [section..bss]
test eax, eax
je 0x10001188
mov dword [esp], ebx
call eax
mov dword [ebx + 8], eax
sub esp, 4
test eax, eax
jns 0x10001110
mov eax, dword [ebx]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0x214]
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
mov eax, dword [ebx]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.MODULE
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], str.SystemRoot
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov eax, dword [ebx]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.SystemRoot
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
jmp 0x100010fc
mov dword [esp], str.atl100.dll
call dword [sym.imp.kernel32.dll_LoadLibraryW]
sub esp, 4
test eax, eax
je 0x100011bd
mov dword [esp + 4], str.AtlCreateRegistrar
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [section..bss], eax
sub esp, 8
test eax, eax
jne 0x100010ed
mov dword [ebx + 8], 0x80004002
xor eax, eax
jmp 0x100010fe
Function at 0x1001a8f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28c
mov eax, dword [0x10022008]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
push 0x58
lea eax, [ebp - 0x28c]
mov edi, edx
push 0
push eax
mov esi, ecx
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esi]
add esp, 0xc
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x28c], 0x58
push 0x100
push 0
push eax
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov byte [ebp - 0x1c], 0
add esp, 0xc
mov word [ebp - 0x22c], ax
mov dword [ebp - 0x222], eax
xorps xmm0, xmm0
mov word [ebp - 0x21e], ax
lea eax, [ebp - 0x22c]
movups xmmword [ebp - 0x1b], xmm0
push eax
mov word [ebp - 0xb], 0
mov byte [ebp - 9], 0
movq qword [ebp - 0x22a], xmm0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x220]
push eax
movzx eax, word [ebp - 0x222]
push eax
movzx eax, word [ebp - 0x224]
push eax
movzx eax, word [ebp - 0x226]
push eax
movzx eax, word [ebp - 0x22a]
push eax
movzx eax, word [ebp - 0x22c]
push eax
lea eax, [ebp - 0x1c]
push str._04d_02d_02d__02d_02d_02d
push eax
call fcn.1001abf0
lea eax, [esi + 0x218]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [esi + 8]
push eax
lea eax, [ebp - 0x11c]
push str.CG70__s__s._s.bin
push eax
call fcn.1001ac30
add esp, 0x34
lea eax, [ebp - 0x21c]
push 0x100
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x11c]
push eax
lea eax, [esi + 0x118]
push eax
lea eax, [ebp - 0x21c]
push str._s_s
push eax
call fcn.1001ac30
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x26c], 0x100
mov dword [ebp - 0x270], eax
add esp, 0x10
lea eax, [esi + 0x318]
mov dword [ebp - 0x280], eax
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameA]
test eax, eax
je 0x1001aaa6
lea eax, [ebp - 0x11c]
add esi, 0x418
push eax
push 0x100
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
add esp, 0xc
mov dword [ebp - 0x230], 0
lea eax, [ebp - 0x230]
push 0x10020370
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov eax, dword [ebp - 0x230]
add esp, 0xc
test eax, eax
jne 0x1001aad6
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1001ea83
mov esp, ebp
pop ebp
ret
push 0x10020370
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x230], 0
push eax
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov eax, dword [ebp - 0x230]
add esp, 0xc
test eax, eax
je 0x1001aaf2
push eax
push dword [ebp + 8]
push 1
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push dword [ebp - 0x230]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov ecx, dword [ebp - 8]
mov eax, 1
pop edi
xor ecx, ebp
pop esi
call fcn.1001ea83
mov esp, ebp
pop ebp
ret
Function at 0x1001ab10
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x10022008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x100
lea eax, [ebp - 0x104]
mov esi, ecx
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [esi + 0x18]
push eax
lea eax, [ebp - 0x104]
push str._s_btn.ini
push eax
call fcn.1001ac30
push 0x10020380
lea eax, [ebp - 0x104]
mov dword [ebp - 0x108], 0
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add esp, 0x24
cmp dword [ebp - 0x108], 0
pop esi
je 0x1001abd1
lea eax, [ebp - 0x104]
push eax
push 0xffffffffffffffff
push str.func
push str.Button
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [0x10023c84], eax
cmp eax, 0x64
je 0x1001abaf
or ecx, 0xffffffff
cmp eax, 0x6f
cmovne eax, ecx
mov dword [0x10023c84], eax
push dword [ebp - 0x108]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001ea83
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.1001ea83
mov esp, ebp
pop ebp
ret
Function at 0x1001d6b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x10022008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov dword [ebp - 0x18], esi
call fcn.1001a820
test eax, eax
je 0x1001d84c
push 0x100201d4
lea eax, [esi + 0x418]
mov dword [ebp - 8], 0
push eax
lea eax, [ebp - 8]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov eax, dword [ebp - 8]
add esp, 0xc
test eax, eax
je 0x1001d815
push 2
push 0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
push dword [ebp - 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
add esp, 4
mov esi, eax
push dword [ebp - 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
add esp, 4
push esi
call fcn.1001ea94
add esp, 4
mov dword [ebp - 0x14], eax
push dword [ebp - 8]
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push dword [ebp - 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov dword [ebp - 8], 0
push 0
push 0x100203a4
push 0xa
call ebx
sub esp, 0xc4
mov dword [ebp - 0x10], 0xa
mov edi, esp
mov dword [ebp - 0xc], 0x2d
mov ecx, 0x34
lea esi, [ebp + 8]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x10]
push eax
mov edx, ebx
mov ecx, edi
call fcn.1001c700
mov esi, eax
add esp, 0xd4
test esi, esi
jne 0x1001d803
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x10], eax
push 0x3f5
push 0x100203a4
push 0xc8
mov dword [ebp - 0xc], 0x2d
call ebx
add esp, 0xc
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
mov ecx, dword [edi + 0x6ce]
push eax
push ebx
call fcn.1001d3a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x1001d803
push 0x3f5
push 0x10020398
push 0x190
call ebx
add esp, 0xc
push esi
push 0x100203a4
push 0x64
call ebx
add esp, 0xc
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x1001d851
push eax
call fcn.1001ea9d
add esp, 4
jmp 0x1001d851
push 0
push 0x100203a4
push 0
call ebx
add esp, 0xc
push 0x403
push str._failed.
push 0x190
call ebx
add esp, 0xc
mov esi, 0x100
push 0
push 0x100203a4
push 5
call ebx
add esp, 0xc
jmp 0x1001d851
mov esi, 0x101
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1001ea83
mov esp, ebp
pop ebp
ret
Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x407ef8
nop
nop
mov ecx, 0x7c91d36
nop
nop
nop
test eax, eax
nop
nop
nop
je 0x42e04e
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x42e024
nop
nop
mov eax, section..rsrc
nop
mov ebx, 0x42cd70
nop
mov ecx, 0xb17307a
nop
test eax, eax
nop
nop
nop
nop
je 0x42e084
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
add eax, 4
nop
cmp eax, ebx
nop
nop
nop
jne 0x42e06c
nop
nop
nop
nop
nop
nop
nop
nop
nop
popal
jmp 0x401219
Function at 0x4017b0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [0x417a2c]
push ebx
push esi
push edi
test eax, eax
jne 0x4017ec
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov ecx, dword [0x4179d0]
push eax
push esi
push ecx
call fcn.0040ddb0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
je 0x4018c0
test edi, edi
jne 0x4018a5
pop edi
pop esi
pop ebx
ret
cmp eax, 1
jne 0x40183d
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov edx, dword [0x4179d0]
shr eax, 1
push eax
lea ebx, [esi + eax]
push ebx
push edx
call fcn.0040ddb0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov ecx, edi
je 0x4018c0
test edi, edi
je 0x4018c0
mov al, byte [ebx]
mov byte [esi], al
inc esi
inc ebx
cmp al, 0xa
jne 0x401836
mov byte [esi - 1], 0xd
mov byte [esi], al
inc esi
inc edi
dec ecx
jne 0x401824
sub esi, edi
jmp 0x4018a5
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov ecx, dword [0x4179d0]
dec eax
push eax
push esi
push ecx
mov ebx, esi
call fcn.0040ddb0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov ecx, edi
je 0x4018c0
test edi, edi
je 0x4018c0
mov byte [edi + esi], 0xa
mov al, byte [ebx]
mov byte [esi], al
inc esi
inc ebx
cmp al, 0xd
jne 0x40187b
cmp byte [ebx], 0xa
jne 0x40187b
dec esi
dec edi
dec ecx
jne 0x40186a
test edi, edi
jne 0x40189b
mov edx, dword [0x4179d0]
push 1
push esi
push edx
call fcn.0040ddb0
add esp, 0xc
mov edi, 1
jmp 0x4018a5
sub esi, edi
cmp byte [edi + esi - 1], 0x1a
jne 0x4018a5
dec edi
push edi
push esi
call fcn.00405330
mov dword [0x4179c8], eax
mov eax, dword [0x463760]
add esp, 8
add eax, edi
mov dword [0x463760], eax
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x4018d0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
cmp esi, 1
jl 0x4018e0
cmp esi, 9
jle 0x4018ed
push 0x415158
call fcn.004056d0
add esp, 4
mov eax, dword [0x433700]
xor ebx, ebx
cmp eax, ebx
mov dword [0x4179e0], ebx
jne 0x401912
mov dword [0x4179e0], 1
mov dword [0x433700], 0x10000
push edi
mov ecx, 0x3fff
xor eax, eax
mov edi, 0x453760
mov word [0x46375e], bx
xor edx, edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dx, word [esi*8 + 0x41510c]
xor eax, eax
mov ax, word [esi*8 + 0x41510a]
xor ecx, ecx
mov cx, word [esi*8 + 0x415108]
mov dword [0x4179d4], eax
xor eax, eax
cmp esi, 1
mov ax, word [esi*8 + 0x41510e]
mov dword [0x453740], ecx
mov dword [0x433704], edx
mov dword [0x443720], eax
pop edi
jne 0x401977
mov eax, dword [esp + 0x10]
or byte [eax], 4
jmp 0x401983
cmp esi, 9
jne 0x401983
mov eax, dword [esp + 0x10]
or byte [eax], 2
push 0x8000
push 0x443740
mov dword [0x4336fc], ebx
mov dword [0x453748], ebx
call dword [0x416f04]
add esp, 8
cmp eax, ebx
mov dword [0x4179e4], eax
je 0x401a00
cmp eax, 0xffffffff
je 0x401a00
mov esi, 0x106
mov dword [0x4179dc], ebx
cmp eax, esi
jae 0x4019d4
cmp dword [0x4179dc], ebx
jne 0x4019d4
call fcn.00401b80
cmp dword [0x4179e4], esi
jb 0x4019bf
xor ecx, ecx
xor eax, eax
xor edx, edx
and ecx, 0x3ff
mov dl, byte [eax + 0x443740]
and edx, 0x7fff
shl ecx, 5
xor ecx, edx
inc eax
cmp eax, 2
jb 0x4019d8
pop esi
mov dword [0x4179d8], ecx
pop ebx
ret
mov dword [0x4179e4], ebx
pop esi
mov dword [0x4179dc], 1
pop ebx
ret
Function at 0x401fe0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [0x4179e4]
push esi
xor esi, esi
mov dword [0x4336f8], 2
test eax, eax
je 0x4021e4
mov edx, dword [0x4179d8]
mov ecx, dword [0x4336fc]
push ebx
push edi
xor eax, eax
and edx, 0x3ff
mov al, byte [ecx + 0x443742]
mov edi, ecx
and eax, 0x7fff
and edi, 0x7fff
shl edx, 5
xor eax, edx
xor edx, edx
mov dword [0x4179d8], eax
mov dx, word [eax*2 + 0x453760]
mov word [eax*2 + 0x453760], cx
test edx, edx
mov word [edi*2 + 0x433720], dx
je 0x402072
mov eax, ecx
sub eax, edx
cmp eax, 0x7efa
ja 0x402072
push edx
call fcn.00401a30
mov esi, eax
mov eax, dword [0x4179e4]
add esp, 4
cmp esi, eax
jbe 0x40206c
mov esi, eax
mov ecx, dword [0x4336fc]
cmp esi, 3
jb 0x402138
mov ebx, dword [0x453744]
lea edx, [esi - 3]
sub ecx, ebx
push edx
push ecx
call fcn.00404d40
mov ecx, dword [0x4179e4]
mov edi, eax
mov eax, dword [0x4179d4]
add esp, 8
sub ecx, esi
cmp esi, eax
mov dword [0x4179e4], ecx
ja 0x402100
mov edx, dword [0x4179d8]
mov ecx, dword [0x4336fc]
dec esi
inc ecx
xor eax, eax
and edx, 0x3ff
mov al, byte [ecx + 0x443742]
and eax, 0x7fff
shl edx, 5
xor edx, eax
mov eax, ecx
and eax, 0x7fff
dec esi
mov bx, word [edx*2 + 0x453760]
mov word [edx*2 + 0x453760], cx
mov word [eax*2 + 0x433720], bx
jne 0x4020b6
inc ecx
mov dword [0x4179d8], edx
mov dword [0x4336fc], ecx
jmp 0x40216d
mov ecx, dword [0x4336fc]
xor edx, edx
add ecx, esi
xor eax, eax
xor esi, esi
mov dword [0x4336fc], ecx
mov dl, byte [ecx + 0x443740]
mov al, byte [ecx + 0x443741]
and edx, 0x3ff
and eax, 0x7fff
shl edx, 5
xor edx, eax
mov dword [0x4179d8], edx
jmp 0x40216d
xor edx, edx
mov dl, byte [ecx + 0x443740]
push edx
push 0
call fcn.00404d40
mov ecx, dword [0x4179e4]
add esp, 8
mov edx, dword [0x4179d8]
dec ecx
mov dword [0x4179e4], ecx
mov ecx, dword [0x4336fc]
inc ecx
mov edi, eax
mov dword [0x4336fc], ecx
test edi, edi
je 0x4021a5
mov edx, dword [0x453748]
test edx, edx
jl 0x402183
lea eax, [edx + 0x443740]
jmp 0x402185
xor eax, eax
sub ecx, edx
push 0
push ecx
push eax
call fcn.004043c0
mov ecx, dword [0x4336fc]
mov edx, dword [0x4179d8]
add esp, 0xc
mov dword [0x453748], ecx
mov eax, dword [0x4179e4]
cmp eax, 0x106
jae 0x4021d8
mov edi, dword [0x4179dc]
test edi, edi
jne 0x4021d8
call fcn.00401b80
mov eax, dword [0x4179e4]
mov edx, dword [0x4179d8]
mov ecx, dword [0x4336fc]
cmp eax, 0x106
jb 0x4021b1
test eax, eax
jne 0x402008
pop edi
pop ebx
jmp 0x4021ea
mov ecx, dword [0x4336fc]
mov edx, dword [0x453748]
pop esi
test edx, edx
jl 0x40220a
sub ecx, edx
lea eax, [edx + 0x443740]
push 1
push ecx
push eax
call fcn.004043c0
add esp, 0xc
ret
sub ecx, edx
xor eax, eax
push 1
push ecx
push eax
call fcn.004043c0
add esp, 0xc
ret
Function at 0x402220
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x140
push ebx
push ebp
push esi
push edi
push 0x12c
call fcn.0040aee2
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x402388
mov esi, dword [esp + 0x154]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 4
push ecx
call fcn.0040aee2
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40237f
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, ebx
mov edx, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4151a0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41519c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x128], eax
jne 0x4022f9
push ebx
jmp 0x402380
lea edi, [esp + 0x3c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402368
mov ecx, dword [0x417a34]
test ecx, ecx
jne 0x402368
mov edx, eax
and edx, 4
cmp dl, 4
je 0x402348
and eax, 2
cmp al, 2
jne 0x402368
push ebx
call fcn.0040abdb
add esp, 4
mov dword [ebp + 0x124], 0
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret
pop edi
mov dword [ebp + 0x124], 1
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x140
ret
push ebp
call fcn.0040abdb
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret