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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x430100]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x38], 0
je 0x40fcb7
mov ecx, dword [ebp - 0x2c]
movzx edx, byte [ecx + 0x3d]
test edx, edx
jne 0x40fcbe
mov al, 1
jmp 0x40fdc4
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x3c], 0xffffffff
mov ecx, dword [ebp - 0x3c]
push ecx
mov ecx, dword [ebp - 0x2c]
call dword [ebp - 0x4c]
mov dword [ebp - 0x50], eax
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x40], 0xffffffff
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x50]
jne 0x40fd01
mov dword [ebp - 0x44], 1
jmp 0x40fd08
mov dword [ebp - 0x44], 0
mov cl, byte [ebp - 0x44]
mov byte [ebp - 0x2d], cl
movzx edx, byte [ebp - 0x2d]
test edx, edx
je 0x40fd1d
xor al, al
jmp 0x40fdc4
mov dword [ebp - 0x64], 0x20
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x54], ecx
lea edx, [ebp - 0x58]
push edx
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x2c]
add edx, 0x40
push edx
mov ecx, dword [ebp - 0x54]
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x40fd60
cmp dword [ebp - 0x34], 1
je 0x40fd67
cmp dword [ebp - 0x34], 3
je 0x40fdb7
jmp 0x40fdc2
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x3d], 0
mov ecx, dword [ebp - 0x58]
lea edx, [ebp - 0x28]
sub ecx, edx
mov dword [ebp - 0x38], ecx
je 0x40fd97
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x38]
push edx
push 1
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x38], eax
je 0x40fd97
xor al, al
jmp 0x40fdc4
mov ecx, dword [ebp - 0x2c]
movzx edx, byte [ecx + 0x3d]
test edx, edx
jne 0x40fdab
mov dword [ebp - 0x48], 1
jmp 0x40fdb2
mov dword [ebp - 0x48], 0
mov al, byte [ebp - 0x48]
jmp 0x40fdc4
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x3d], 0
mov al, 1
jmp 0x40fdc4
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422610
mov esp, ebp
pop ebp
ret
Function at 0x4116a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x38], 0
je 0x4116cc
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 - 4]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
jmp 0x4117b8
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
cmp dword [ebp + 0x10], 0
jl 0x411769
jg 0x4116f5
cmp dword [ebp + 0xc], 0
jbe 0x411769
cmp dword [ebp - 0xc], 0
jl 0x411769
jg 0x411703
cmp dword [ebp - 0x10], 0
jbe 0x411769
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 0xc]
jg 0x411721
jl 0x411715
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 0x10]
jae 0x411721
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 8]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp + 8]
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 0xc]
sub edx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x10]
sbb eax, dword [ebp - 0xc]
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
cmp dword [ebp + 0x10], 0
jl 0x4117ac
jg 0x411777
cmp dword [ebp + 0xc], 0
jbe 0x4117ac
mov edx, dword [ebp - 4]
cmp dword [edx + 0x4c], 0
je 0x4117ac
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 1
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
xor ecx, ecx
mov edx, dword [ebp + 0xc]
sub edx, eax
mov eax, dword [ebp + 0x10]
sbb eax, ecx
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
sbb edx, dword [ebp + 0x10]
mov esp, ebp
pop ebp
ret 0xc

Function at 0x423c58
Capabilities:
Parse pe header

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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x490d52
mov eax, dword fs:[0]
push eax
sub esp, 0x214
mov eax, dword [0x4bf434]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x21c], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
push 0x208
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x218]
push eax
mov dword [ebp - 0x21c], 1
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
jne 0x403cf1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x403cff
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x403cff
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
call fcn.00403d90
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00488042
mov esp, ebp
pop ebp
ret
Function at 0x40ebd0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x491c00
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x4bf434]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x30]
mov edx, dword [esi + 0x34]
mov edi, edx
sbb ecx, ecx
mov dword [ebp - 4], 0
and ecx, 0xfffffffc
xor al, al
push edx
mov ecx, dword [ecx + esi + 0x30]
rep stosb byte es:[edi], al
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
cmp eax, ecx
mov edx, dword [esi + 0x24]
mov edi, edx
cmovb ecx, eax
mov dword [ebp - 4], 1
xor al, al
rep stosb byte es:[edi], al
push edx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov ecx, dword [esi + 0xc]
add esp, 8
test ecx, ecx
je 0x40ec4c
mov eax, dword [ecx]
push 1
call dword [eax]
test byte [ebp + 8], 1
je 0x40ec5d
push 0x40
push esi
call fcn.00488034
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x412b30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4bf434]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x412bec
cmp byte [esi + 0x3d], 0
je 0x412bec
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x412bda
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x412ba1
sub eax, 1
je 0x412ba5
sub eax, 2
jne 0x412bda
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488042
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x412bc3
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x412bda
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488042
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00488042
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00488042
mov esp, ebp
pop ebp
ret
Function at 0x413390
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [ecx]
cmp esi, 0x10
je 0x4133a7
cmp esi, 0x20
jne 0x41357b
shr esi, 2
mov edx, 4
cmp esi, edx
mov dword [ebp - 0xc], esi
mov eax, esi
cmovb eax, edx
push edi
mov edi, dword [ebp + 8]
lea eax, [eax*4 + 0x1c]
mov dword [ebp - 8], eax
test edi, edi
je 0x41357a
mov dword [edi], 0x10
push ebx
mov dword [edi + 4], eax
xor ebx, ebx
add edi, 8
test esi, esi
je 0x413412
lea edx, [ecx + 5]
movzx ecx, byte [edx - 1]
lea edx, [edx + 4]
movzx eax, byte [edx - 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx - 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx - 2]
shl ecx, 8
or ecx, eax
mov dword [edi + ebx*4], ecx
inc ebx
cmp ebx, esi
jl 0x4133e5
mov eax, dword [ebp - 8]
mov ebx, dword [edi + ebx*4 - 4]
mov ecx, esi
cmp esi, eax
jge 0x4134fa
mov dword [ebp + 8], 0
mov dword [ebp - 4], edi
lea ebx, [ebx]
mov eax, ecx
cdq
idiv esi
test edx, edx
jne 0x413490
mov eax, dword [ebp + 8]
cdq
idiv esi
mov dl, byte [eax + 0x49ddb4]
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx esi, byte [eax + 0x49ddd8]
movzx eax, dl
xor esi, eax
mov eax, ebx
shr eax, 8
movzx eax, al
shl esi, 8
movzx eax, byte [eax + 0x49ddd8]
xor esi, eax
movzx eax, bl
shl esi, 8
shr ebx, 0x18
movzx eax, byte [eax + 0x49ddd8]
xor esi, eax
movzx ebx, byte [ebx + 0x49ddd8]
shl esi, 8
xor ebx, esi
mov esi, dword [ebp - 0xc]
jmp 0x4134dd
cmp esi, 6
jbe 0x4134dd
cmp edx, 4
jne 0x4134dd
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx edx, byte [eax + 0x49ddd8]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax + 0x49ddd8]
shl eax, 8
xor edx, eax
mov eax, ebx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax + 0x49ddd8]
xor edx, eax
movzx eax, bl
shl edx, 8
movzx ebx, byte [eax + 0x49ddd8]
xor ebx, edx
mov eax, dword [ebp - 4]
inc dword [ebp + 8]
xor ebx, dword [eax]
add eax, 4
mov dword [edi + ecx*4], ebx
inc ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
cmp ecx, eax
jl 0x413430
xor esi, esi
sub ecx, 1
js 0x413579
lea eax, [edi + eax*4]
mov dword [ebp + 8], eax
mov ebx, dword [edi + ecx*4]
cmp esi, 4
jl 0x413569
cmp ecx, 4
jb 0x413569
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx edx, byte [eax + 0x49ddd8]
mov eax, ebx
shr eax, 8
movzx eax, al
mov edx, dword [edx*4 + 0x49f3d8]
movzx eax, byte [eax + 0x49ddd8]
xor edx, dword [eax*4 + 0x49f7d8]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax + 0x49ddd8]
xor edx, dword [eax*4 + 0x49efd8]
movzx eax, bl
movzx eax, byte [eax + 0x49ddd8]
xor edx, dword [eax*4 + 0x49fbd8]
mov eax, dword [ebp + 8]
jmp 0x41356b
mov edx, ebx
mov dword [eax], edx
inc esi
add eax, 4
sub ecx, 1
mov dword [ebp + 8], eax
jns 0x413507
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x413b50
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x492280
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x4bf434]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor ebx, ebx
mov ecx, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], ebx
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], esi
push eax
push ecx
mov dword [ebp - 0x2c], esi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x413bbb
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov eax, edi
jmp 0x413cc9
xor edi, edi
cmp dword [ebp - 0x2c], edi
jle 0x413cb4
jmp 0x413bd0
mov edx, dword [eax + edi*4]
test edx, edx
je 0x413ca7
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov eax, edx
mov dword [ebp - 0x14], 7
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413bf4
sub eax, ebx
lea ecx, [ebp - 0x28]
sar eax, 1
push eax
push edx
call fcn.00407630
mov byte [ebp - 4], 1
cmp esi, dword [ebp - 0x34]
je 0x413c5a
mov eax, dword [ebp - 0x28]
mov edx, 7
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x14], eax
xor eax, eax
add esi, 0x18
mov word [ebp - 0x28], ax
mov dword [ebp - 0x38], esi
jmp 0x413c6d
lea eax, [ebp - 0x28]
push eax
push esi
lea ecx, [ebp - 0x3c]
call fcn.00401720
mov esi, dword [ebp - 0x38]
mov edx, dword [ebp - 0x14]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x413ca4
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413c9a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413ce5
push edx
push ecx
call fcn.00488034
add esp, 8
mov eax, dword [ebp - 0x30]
inc edi
cmp edi, dword [ebp - 0x2c]
jl 0x413bd0
mov ebx, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x34]
mov dword [eax], ebx
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00488042
mov esp, ebp
pop ebp
ret
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
Function at 0x413cf0
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4922b8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x4bf434]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x28]
mov edi, dword [ebp + 8]
push esi
push eax
call fcn.00410670
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
call fcn.00413dc0
add esp, 0xc
test eax, eax
jne 0x413d45
xor esi, esi
jmp 0x413d62
cmp dword [esi + 0x14], 8
jb 0x413d4d
mov esi, dword [esi]
cmp dword [edi + 0x14], 8
jb 0x413d55
mov edi, dword [edi]
push dword [ebp + 0x10]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x413d9e
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413d94
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x413d94
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00488034
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00488042
mov esp, ebp
pop ebp
ret
Function at 0x413dc0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4922e8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x4bf434]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x413df6
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x413eb8
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x413e10
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x413eb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x413eb8
lea eax, [ebp - 0x28]
push esi
push eax
call fcn.00410670
add esp, 8
cmp dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
je 0x413ed7
lea eax, [ebp - 0x28]
push eax
call fcn.00413dc0
add esp, 4
test eax, eax
je 0x413ed7
cmp dword [esi + 0x14], 8
jb 0x413e68
mov esi, dword [esi]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x413e82
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x413ed7
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x413eb8
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413eae
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413f03
push edx
push ecx
call fcn.00488034
add esp, 8
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00488042
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x413f13
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413f09
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x413f09
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00488034
add esp, 8
xor eax, eax
jmp 0x413ebd
Function at 0x413fa0
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 8
push ebx
push esi
push edi
test ecx, ecx
je 0x414178
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x414178
test bl, 3
jne 0x414178
lea eax, [ebx - 1]
xor edx, edx
add eax, ecx
mov dword [ebp - 8], edx
cmp byte [eax], 0x3d
jne 0x413fea
inc edx
dec eax
mov dword [ebp - 8], edx
cmp edx, 2
ja 0x414178
cmp byte [eax], 0x3d
je 0x413fd7
shr ebx, 2
xor edi, edi
mov dword [ebp + 8], edi
mov dword [ebp + 0x10], ebx
test ebx, ebx
je 0x41416d
lea esi, [ecx + 2]
mov dword [ebp - 4], esi
mov al, byte [esi - 2]
lea ecx, [eax - 0x41]
cmp cl, 0x19
ja 0x414012
sub al, 0x41
jmp 0x414041
lea ecx, [eax - 0x61]
cmp cl, 0x19
ja 0x41401e
sub al, 0x47
jmp 0x414041
lea ecx, [eax - 0x30]
cmp cl, 9
ja 0x41402a
add al, 4
jmp 0x414041
cmp al, 0x2b
jne 0x414032
mov al, 0x3e
jmp 0x414041
cmp al, 0x2f
jne 0x41403a
mov al, 0x3f
jmp 0x414041
cmp al, 0x3d
sete al
sub al, 1
mov dl, byte [esi - 1]
lea ecx, [edx - 0x41]
cmp cl, 0x19
ja 0x414051
sub dl, 0x41
jmp 0x414085
lea ecx, [edx - 0x61]
cmp cl, 0x19
ja 0x41405e
sub dl, 0x47
jmp 0x414085
lea ecx, [edx - 0x30]
cmp cl, 9
ja 0x41406b
add dl, 4
jmp 0x414085
cmp dl, 0x2b
jne 0x414074
mov dl, 0x3e
jmp 0x414085
cmp dl, 0x2f
jne 0x41407d
mov dl, 0x3f
jmp 0x414085
cmp dl, 0x3d
sete dl
dec dl
mov bl, byte [esi]
lea ecx, [ebx - 0x41]
cmp cl, 0x19
ja 0x414094
sub bl, 0x41
jmp 0x4140c8
lea ecx, [ebx - 0x61]
cmp cl, 0x19
ja 0x4140a1
sub bl, 0x47
jmp 0x4140c8
lea ecx, [ebx - 0x30]
cmp cl, 9
ja 0x4140ae
add bl, 4
jmp 0x4140c8
cmp bl, 0x2b
jne 0x4140b7
mov bl, 0x3e
jmp 0x4140c8
cmp bl, 0x2f
jne 0x4140c0
mov bl, 0x3f
jmp 0x4140c8
cmp bl, 0x3d
sete bl
dec bl
mov ah, byte [esi + 1]
mov cl, ah
sub cl, 0x41
cmp cl, 0x19
ja 0x4140da
sub ah, 0x41
jmp 0x414112
mov cl, ah
sub cl, 0x61
cmp cl, 0x19
ja 0x4140e9
sub ah, 0x47
jmp 0x414112
mov cl, ah
sub cl, 0x30
cmp cl, 9
ja 0x4140f8
add ah, 4
jmp 0x414112
cmp ah, 0x2b
jne 0x414101
mov ah, 0x3e
jmp 0x414112
cmp ah, 0x2f
jne 0x41410a
mov ah, 0x3f
jmp 0x414112
cmp ah, 0x3d
sete ah
dec ah
cmp al, 0xff
je 0x414178
cmp dl, 0xff
je 0x414178
cmp bl, 0xff
je 0x414178
cmp ah, 0xff
je 0x414178
mov esi, dword [ebp + 0xc]
mov cl, dl
shl al, 2
shr cl, 4
or cl, al
shl dl, 4
mov byte [edi + esi], cl
mov al, bl
mov ecx, esi
shr al, 2
mov esi, dword [ebp - 4]
or al, dl
shl bl, 6
add esi, 4
or bl, ah
mov dword [ebp - 4], esi
mov byte [edi + ecx + 1], al
mov eax, dword [ebp + 8]
inc eax
mov byte [edi + ecx + 2], bl
add edi, 3
mov dword [ebp + 8], eax
cmp eax, dword [ebp + 0x10]
jb 0x414003
mov edx, dword [ebp - 8]
sub edi, edx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x414470
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
cmp dword [ebp + 8], 0
push edi
je 0x4145e3
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x4145e3
mov eax, 0xaaaaaaab
mov ecx, edi
mul edi
push ebx
mov ebx, edx
shr ebx, 1
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebx + ebx*2]
sub ecx, eax
mov eax, 0
mov dword [ebp - 4], ecx
setne al
add eax, ebx
shl eax, 2
mov dword [ebp - 8], eax
test esi, esi
je 0x4145dc
xor eax, eax
test ebx, ebx
je 0x414540
mov edi, dword [ebp + 8]
add edi, 2
lea ebx, [ebx]
movzx ecx, byte [edi - 2]
lea edi, [edi + 3]
shr ecx, 2
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + esi], cl
movzx edx, byte [edi - 5]
movzx ecx, byte [edi - 4]
and edx, 3
shr ecx, 4
shl edx, 4
or edx, ecx
movzx ecx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + esi + 1], cl
movzx edx, byte [edi - 4]
movzx ecx, byte [edi - 3]
and edx, 0xf
shr ecx, 6
shl edx, 2
or edx, ecx
movzx ecx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + esi + 2], cl
movzx ecx, byte [edi - 3]
and ecx, 0x3f
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + esi + 3], cl
add eax, 4
sub ebx, 1
jne 0x4144d0
mov ecx, dword [ebp - 4]
mov edi, dword [ebp + 0x10]
sub ecx, 1
je 0x4145a7
sub ecx, 1
jne 0x4145d9
mov ebx, dword [ebp + 8]
movzx ecx, byte [ebx + edi - 2]
shr ecx, 2
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + esi], cl
movzx edx, byte [ebx + edi - 2]
movzx ecx, byte [ebx + edi - 1]
and edx, 3
shr ecx, 4
shl edx, 4
or edx, ecx
movzx ecx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + esi + 1], cl
lea ecx, [eax + 2]
movzx eax, byte [ebx + edi - 1]
and eax, 0xf
mov al, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + esi], al
mov eax, dword [ebp - 8]
mov byte [ecx + esi + 1], 0x3d
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
movzx ecx, byte [edx + edi - 1]
shr ecx, 2
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + esi], cl
movzx ecx, byte [edx + edi - 1]
and ecx, 3
shl ecx, 4
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + esi + 1], cl
mov word [eax + esi + 2], 0x3d3d
mov eax, dword [ebp - 8]
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret