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

Disassembly:
sub esp, 0x120
mov eax, dword [0x5bfd00]
xor eax, esp
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x124]
push ebx
push ebp
mov ebp, dword [esp + 0x134]
xor ebx, ebx
push esi
push edi
mov edi, dword [esp + 0x138]
xor esi, esi
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edi
call fcn.004ca6f0
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jne 0x509e8f
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004b67b0
push eax
push edi
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push ebp
call fcn.004af760
push esi
call dword [0x5bf144]
add esp, 0x20
lea eax, [ebx + 0x4d]
jmp 0x509fef
push 0
push 0x80
push 3
push 0
push 1
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x509ee9
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004b67b0
push eax
push edi
push str.schannel:_failed_to_open_CA_file__s:__s
push ebp
call fcn.004af760
push 0
mov esi, 0x4d
call dword [0x5bf144]
add esp, 0x20
jmp 0x509fe1
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x509f29
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004b67b0
push eax
push edi
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push ebp
call fcn.004af760
add esp, 0x1c
mov esi, 0x4d
jmp 0x509fcd
mov edi, dword [esp + 0x24]
cmp dword [esp + 0x28], ebx
jl 0x509f57
jg 0x509f3d
cmp edi, 0x100000
jbe 0x509f57
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push ebp
call fcn.004af760
add esp, 0xc
mov esi, 0x4d
jmp 0x509fcd
lea eax, [edi + 1]
push eax
call dword [0x5bf140]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x509f6f
lea esi, [eax + 0x1b]
jmp 0x509fcd
test edi, edi
je 0x509fb4
nop dword [eax]
nop word [eax + eax]
push 0
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x50a00c
mov eax, dword [esp + 0x10]
test eax, eax
je 0x50a008
add esi, eax
cmp esi, edi
jb 0x509f80
push ebp
push dword [esp + 0x18]
mov byte [edi + ebx], 0
push edi
push ebx
push dword [esp + 0x2c]
call fcn.00509c10
add esp, 0x14
mov esi, eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [0x5bf144]
add esp, 4
push dword [esp + 0x20]
call fcn.00564f8c
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x12c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00563360
add esp, 0x120
ret
mov edi, esi
jmp 0x509fb4
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004b67b0
push eax
push dword [esp + 0x24]
push str.schannel:_failed_to_read_from_CA_file__s:__s
push ebp
call fcn.004af760
add esp, 0x1c
mov esi, 0x4d
jmp 0x509fcd
Function at 0x5110d0
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00511240

Function at 0x5114c0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00511590

Function at 0x512470
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [0x5bf140]
mov esi, eax
add esp, 4
test esi, esi
jne 0x51249b
pop esi
pop ebp
add esp, 0xc
ret
lea ecx, [esi + 0xc]
mov dword [esi], ebp
mov dword [esi + 4], ecx
mov eax, dword [ebp + 0xc]
add eax, ecx
push ebx
mov ebx, dword [esp + 0x24]
mov dword [esi + 8], eax
push edi
lea edi, [ebp + 4]
cmp ebx, dword [ebp + 0x10]
jbe 0x5124ea
mov eax, dword [ebp]
push ecx
call eax
mov eax, dword [edi]
push ebx
push dword [esp + 0x2c]
push dword [esi + 4]
call eax
mov eax, dword [esi + 8]
add eax, dword [ebp + 0xc]
push dword [esi + 4]
mov dword [esp + 0x28], eax
push eax
mov eax, dword [ebp + 8]
call eax
mov ebx, dword [ebp + 0x14]
add esp, 0x18
mov dword [esp + 0x28], ebx
jmp 0x5124f2
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
push dword [esi + 4]
mov eax, dword [ebp]
call eax
push dword [esi + 8]
mov eax, dword [ebp]
call eax
mov eax, dword [esp + 0x30]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x512566
mov ebp, dword [esp + 0x14]
mov ebx, eax
mov dword [esp + 0x18], eax
nop dword [eax]
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x13], al
lea eax, [esp + 0x13]
push 1
push eax
push dword [esi + 4]
mov eax, dword [edi]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x1f], al
lea eax, [esp + 0x1f]
push 1
push eax
push dword [esi + 8]
mov eax, dword [edi]
call eax
add esp, 0x18
sub ebx, 1
jne 0x512520
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
lea edi, [ebp + 4]
cmp ebx, dword [ebp + 0x10]
jae 0x512595
nop dword [eax + eax]
mov eax, dword [edi]
push 1
push 0x58f738
push dword [esi + 4]
call eax
mov eax, dword [edi]
push 1
push 0x58f739
push dword [esi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [ebp + 0x10]
jb 0x512570
pop edi
pop ebx
mov eax, esi
pop esi
pop ebp
add esp, 0xc
ret
Function at 0x5125c0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push esi
push dword [esp + 0x24]
call fcn.004b21c0
mov edx, dword [ebp + 0xc]
mov ebx, eax
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x14], ebx
lea ecx, [ecx + edx*2]
add ecx, 0xc
push ecx
call dword [0x5bf140]
mov esi, eax
add esp, 8
test esi, esi
je 0x512742
lea ecx, [esi + 0xc]
mov dword [esi], ebp
mov dword [esi + 4], ecx
mov eax, dword [ebp + 0xc]
add eax, ecx
mov dword [esi + 8], eax
push edi
lea edi, [ebp + 4]
cmp ebx, dword [ebp + 0x10]
jbe 0x512642
mov eax, dword [ebp]
push ecx
call eax
mov eax, dword [esp + 0x28]
push ebx
push eax
push dword [esi + 4]
mov eax, dword [edi]
call eax
mov eax, dword [esi + 8]
add eax, dword [ebp + 0xc]
push dword [esi + 4]
mov dword [esp + 0x38], eax
push eax
mov eax, dword [ebp + 8]
call eax
mov eax, dword [ebp + 0x14]
add esp, 0x18
mov dword [esp + 0x14], eax
push dword [esi + 4]
mov eax, dword [ebp]
call eax
push dword [esi + 8]
mov eax, dword [ebp]
call eax
mov eax, dword [esp + 0x1c]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x5126b6
mov ebp, dword [esp + 0x24]
mov ebx, eax
mov dword [esp + 0x18], eax
nop dword [eax]
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x13], al
lea eax, [esp + 0x13]
push 1
push eax
push dword [esi + 4]
mov eax, dword [edi]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x1f], al
lea eax, [esp + 0x1f]
push 1
push eax
push dword [esi + 8]
mov eax, dword [edi]
call eax
add esp, 0x18
sub ebx, 1
jne 0x512670
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
lea edi, [ebp + 4]
cmp ebx, dword [ebp + 0x10]
jae 0x5126e5
nop dword [eax + eax]
mov eax, dword [edi]
push 1
push 0x58f738
push dword [esi + 4]
call eax
mov eax, dword [edi]
push 1
push 0x58f739
push dword [esi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [ebp + 0x10]
jb 0x5126c0
push dword [esp + 0x30]
call fcn.004b21c0
mov ecx, dword [esi]
push eax
push dword [esp + 0x34]
push dword [esi + 4]
mov eax, dword [ecx + 4]
call eax
mov edi, dword [esp + 0x44]
add esp, 0x10
mov ebx, dword [esi]
test edi, edi
jne 0x512710
mov edi, dword [ebx + 0xc]
add edi, dword [esi + 8]
push dword [esi + 4]
mov eax, dword [ebx + 8]
push edi
call eax
push dword [ebx + 0x14]
mov eax, dword [ebx + 4]
push edi
push dword [esi + 8]
call eax
push dword [esi + 8]
mov eax, dword [ebx + 8]
push edi
call eax
push esi
call dword [0x5bf144]
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0xc
ret
Function at 0x512830
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0xc
lea eax, [esp + 4]
push 0xf0000040
push 0x18
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x512856
mov eax, 0x1b
add esp, 0xc
ret
lea eax, [esp + 8]
push eax
push 0
push 0
push 0x800c
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x51288e
push eax
push dword [esp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [esp + 4], 0
mov eax, 2
add esp, 0xc
ret
push dword [esp + 0x18]
call fcn.004b21c0
add esp, 4
push 0
push eax
push dword [esp + 0x1c]
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
push 0
lea eax, [esp + 4]
mov dword [esp + 4], 0
push eax
push 0
push 2
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
cmp dword [esp], 0x20
jne 0x5128e5
push 0
lea eax, [esp + 4]
push eax
push dword [esp + 0x18]
push 2
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov eax, dword [esp + 8]
test eax, eax
je 0x5128f4
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [esp + 4]
test ecx, ecx
je 0x512905
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
add esp, 0xc
ret
Function at 0x51c050
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
xor esi, esi
test edi, edi
je 0x51c09c
push ebx
mov ebx, dword [esp + 0x10]
mov cl, byte [esi + ebx]
mov dl, cl
mov al, cl
shr dl, 1
and al, 0xfe
not dl
movzx eax, al
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
or cl, 1
test dl, 2
movzx ecx, cl
cmove ecx, eax
mov byte [esi + ebx], cl
inc esi
cmp esi, edi
jb 0x51c061
pop ebx
pop edi
pop esi
ret
Function at 0x5203d0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x520558
cmp dword [esi + 0x20], 0
je 0x520558
cmp dword [esi + 0x24], 0
je 0x520558
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x520558
cmp dword [eax], esi
jne 0x520558
mov eax, dword [eax + 4]
cmp eax, 0x2a
je 0x520437
cmp eax, 0x39
je 0x520437
cmp eax, 0x45
je 0x520437
cmp eax, 0x49
je 0x520437
cmp eax, 0x5b
je 0x520437
cmp eax, 0x67
je 0x520437
cmp eax, 0x71
je 0x520437
cmp eax, 0x29a
jne 0x520558
push edi
mov edi, dword [esi + 0x1c]
mov dword [esi + 0x14], 0
mov dword [esi + 8], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x2c], 2
mov ecx, dword [edi + 0x18]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], eax
test ecx, ecx
jns 0x520470
neg ecx
mov dword [edi + 0x18], ecx
cmp ecx, 2
mov eax, 0x2a
push 0
mov edx, 0x39
cmove eax, edx
push 0
mov dword [edi + 4], eax
push 0
jne 0x520492
call fcn.005114c0
jmp 0x520497
call fcn.005110d0
add esp, 0xc
mov dword [esi + 0x30], eax
mov dword [edi + 0x28], 0xfffffffe
push edi
call fcn.005218c0
mov esi, dword [esi + 0x1c]
xor edx, edx
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x4c]
add eax, eax
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x44]
mov word [eax + ecx*2 - 2], dx
mov eax, dword [esi + 0x4c]
lea eax, [eax*2 - 2]
push eax
push edx
push dword [esi + 0x44]
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esi + 0x84]
add esp, 0x10
lea ecx, [eax + eax*2]
movzx eax, word [ecx*4 + 0x5968ba]
mov dword [esi + 0x80], eax
movzx eax, word [ecx*4 + 0x5968b8]
mov dword [esi + 0x8c], eax
movzx eax, word [ecx*4 + 0x5968bc]
mov dword [esi + 0x90], eax
xor eax, eax
movzx ecx, word [ecx*4 + 0x5968be]
pop edi
mov dword [esi + 0x7c], ecx
mov dword [esi + 0x6c], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x74], 0
mov dword [esi + 0x16b4], 0
mov dword [esi + 0x78], 2
mov dword [esi + 0x60], 2
mov dword [esi + 0x68], 0
mov dword [esi + 0x48], 0
pop esi
pop ebp
ret
mov eax, 0xfffffffe
pop esi
pop ebp
ret
Function at 0x52f770
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push 0x1008
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
jne 0x52f7bf
mov esi, dword [ebp + 8]
push 0xc8
push eax
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esi + 0x10], 1
mov dword [esi + 0x4c], 0xffffffff
mov dword [esi + 0x50], 0xffffffff
mov dword [esi + 0x30], 7
pop esi
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push edi
call ebx
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push 2
push 0
push dword [ebp + 0xc]
mov dword [eax], 0
call esi
call ebx
push dword [ebp + 0xc]
mov edi, dword [eax]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov dword [ebp - 8], eax
call ebx
push 0
push 0
push dword [ebp + 0xc]
or edi, dword [eax]
call esi
add esp, 0x1c
call ebx
mov eax, dword [eax]
or eax, edi
jne 0x52f93e
mov ebx, dword [ebp - 8]
test ebx, ebx
js 0x52f93e
jne 0x52f832
mov esi, dword [ebp + 8]
push 0xc8
push eax
push esi
call sub.VCRUNTIME140.dll_memset
mov dword [esi + 0x30], 3
jmp 0x52f955
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x52f84f
cmp ebx, eax
jbe 0x52f84f
push 6
push dword [ebp + 8]
call fcn.0052f5a0
add esp, 8
jmp 0x52f96d
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, dword [ebp - 4]
add esp, 4
mov dword [ebp - 8], eax
mov dword [edi], eax
test eax, eax
jne 0x52f885
push 7
push dword [ebp + 8]
call fcn.0052f5a0
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 8
push edi
call esi
add esp, 4
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
xor esi, esi
test ebx, ebx
jle 0x52f8b7
nop dword [eax + eax]
push dword [ebp + 0xc]
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [edi]
add eax, esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
test eax, eax
je 0x52f91a
add esi, eax
cmp esi, ebx
jl 0x52f890
mov eax, dword [edi]
mov dword [ebp - 8], eax
mov esi, dword [ebp + 8]
push 0xc8
push 0
push esi
mov dword [edi + 4], ebx
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [esi + 0xc], edi
mov dword [esi + 0x40], ebx
mov dword [esi + 0x10], 1
pop edi
pop ebx
mov dword [esi + 0x4c], 0xffffffff
mov dword [esi + 0x50], 0xffffffff
mov dword [esi + 0x3c], eax
mov dword [esi + 0xbc], 0
mov dword [esi + 0xc0], 0
mov dword [esi + 0xc4], 0
mov dword [esi + 8], 0x52c3c0
pop esi
mov esp, ebp
pop ebp
ret
push 2
push dword [ebp + 8]
call fcn.0052f5a0
push dword [edi]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 0xc
push edi
call esi
add esp, 4
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
push 0xc8
push 0
push esi
call sub.VCRUNTIME140.dll_memset
mov dword [esi + 0x30], 2
mov dword [esi + 0x10], 1
add esp, 0xc
mov dword [esi + 0x4c], 0xffffffff
mov dword [esi + 0x50], 0xffffffff
mov edi, dword [ebp - 4]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push edi
call esi
add esp, 4
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x5353f0
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x5bfd00]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
cmp byte [esi + 8], 0
je 0x535478
push edi
push 1
push 0
push dword [esi + 4]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__locking]
push dword [esi + 4]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
mov edi, dword [esi]
lea eax, [ebp - 0x34]
push eax
push dword [edi]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wstat64i32]
add esp, 0x18
test eax, eax
jne 0x535461
mov eax, dword [ebp - 0x2e]
and eax, 0xf000
cmp eax, 0x4000
jne 0x535461
push dword [edi]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
pop edi
mov byte [esi + 8], 0
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00563360
mov esp, ebp
pop ebp
ret
push dword [edi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x535473
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [esi + 8], 0
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00563360
mov esp, ebp
pop ebp
ret

Function at 0x5356e0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov esi, dword [esi]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x5356f0
sub esi, ecx
sar esi, 1
lea esi, [esi*2 + 2]
push esi
call fcn.00529210
mov edi, eax
mov eax, dword [ebp + 8]
push esi
push dword [eax]
push edi
call sub.VCRUNTIME140.dll_memcpy
movzx ecx, word [edi]
add esp, 0x10
mov edx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov esi, edi
test cx, cx
je 0x53577d
nop dword [eax]
cmp cx, 0x5c
je 0x53573c
cmp cx, 0x2f
jne 0x53576f
cmp esi, edi
je 0x53576f
cmp word [esi - 2], 0x3a
je 0x53576f
xor eax, eax
push eax
push edi
mov word [esi], ax
call edx
test eax, eax
jne 0x535761
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x5357a9
mov edx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, 0x5c
mov word [esi], ax
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x535730
push 0
push edi
call edx
test eax, eax
jne 0x535799
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov ecx, 1
cmovne ebx, ecx
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret
push edi
mov ebx, 1
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x5360a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x5bfd00]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push 0x5a55d8
push dword [esi]
mov dword [ebp - 0x3c], edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x536185
lea eax, [ebp - 0x34]
push eax
push dword [esi]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wstat64i32]
add esp, 8
test eax, eax
jne 0x536198
mov eax, dword [ebp - 0x2e]
and eax, 0xf000
cmp eax, 0x8000
jne 0x536198
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x536198
cmp esi, 0x8000000
ja 0x53617b
lea eax, [esi + 1]
push eax
call fcn.00529210
add esp, 4
mov dword [ebp - 0x38], eax
test eax, eax
je 0x53617b
xor edi, edi
test esi, esi
je 0x536150
nop dword [eax]
push ebx
push esi
add eax, edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
test eax, eax
je 0x53614d
add edi, eax
sub esi, eax
mov eax, dword [ebp - 0x38]
jne 0x536130
mov eax, dword [ebp - 0x38]
push ebx
mov byte [edi + eax], 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [ebp - 0x3c]
add esp, 4
test eax, eax
je 0x536167
mov dword [eax], edi
mov eax, dword [ebp - 0x38]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00563360
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00563360
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push 1
call fcn.00529210
add esp, 8
mov byte [eax], 0
test edi, edi
je 0x5361b6
mov dword [edi], 0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00563360
mov esp, ebp
pop ebp
ret

Function at 0x5361d0
Capabilities:
Check if file exists
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x5bfd00]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x34]
push eax
push dword [esi]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wstat64i32]
add esp, 8
test eax, eax
jne 0x536222
mov eax, dword [ebp - 0x2e]
and eax, 0xf000
cmp eax, 0x4000
jne 0x536222
push dword [esi]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
neg eax
pop esi
sbb eax, eax
inc eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00563360
mov esp, ebp
pop ebp
ret
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x53624d
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 2
pop esi
setne cl
mov eax, ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00563360
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.00563360
mov esp, ebp
pop ebp
ret
Function at 0x5362e0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x5bfd00]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x258], esi
nop
mov eax, dword [esi]
cmp eax, 0xffffffff
jne 0x536383
mov esi, dword [esi + 4]
mov esi, dword [esi]
lea ecx, [esi + 2]
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x536310
sub esi, ecx
sar esi, 1
lea eax, [esi*2 + 6]
push eax
call fcn.00529210
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x53644b
mov ecx, dword [ebp - 0x258]
lea edi, [esi + esi]
push edi
mov ecx, dword [ecx + 4]
push dword [ecx]
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [edi + ebx], 0x2a005c
xor eax, eax
mov word [ebx + esi*2 + 4], ax
lea eax, [ebp - 0x254]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [ebp - 0x258]
push ebx
mov dword [esi], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
cmp dword [esi], 0xffffffff
jmp 0x536393
lea ecx, [ebp - 0x254]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x53644b
mov ecx, 0x57b430
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x5363ca
test dx, dx
je 0x5363c6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x5363ca
add eax, 4
add ecx, 4
test dx, dx
jne 0x5363a4
xor eax, eax
jmp 0x5363cf
sbb eax, eax
or eax, 1
test eax, eax
je 0x536300
mov ecx, 0x57b434
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x536408
test dx, dx
je 0x536404
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x536408
add eax, 4
add ecx, 4
test dx, dx
jne 0x5363e2
xor eax, eax
jmp 0x53640d
sbb eax, eax
or eax, 1
test eax, eax
je 0x536300
mov eax, dword [esi + 8]
test eax, eax
je 0x536425
push eax
call fcn.00536560
add esp, 4
lea eax, [ebp - 0x228]
push eax
push dword [esi + 4]
call fcn.00535e90
add esp, 8
mov dword [esi + 8], eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00563360
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00563360
mov esp, ebp
pop ebp
ret
Function at 0x536460
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push edi
push dword [ebp + 0x14]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov edi, eax
add esp, 8
mov dword [ebp + 8], edi
test edi, edi
jne 0x536484
lea eax, [edi + 1]
pop edi
pop ebp
ret
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x5364c1
push edi
push esi
push 1
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x5364af
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 0x16
je 0x5364b7
cmp edi, esi
jb 0x5364be
add ebx, edi
sub esi, edi
mov edi, dword [ebp + 8]
test esi, esi
jne 0x536490
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 8
xor eax, eax
test esi, esi
setne al
pop esi
pop ebx
pop edi
pop ebp
ret