joyce8/EMBER2024-capa huggingface dataset:
Function at 0x460d8e
Capabilities:
Identify system language via api

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x5e9750]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x144], eax
mov eax, dword [ebp + 0xc]
push edi
push 0x58c738
mov dword [ebp - 0x13c], eax
xor esi, esi
call fcn.0044910e
pop ecx
cmp eax, esi
je 0x460e78
push str.GetThreadPreferredUILanguages
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, esi
je 0x460e78
xor eax, eax
push 0xc8
mov word [ebp - 0xd0], ax
lea eax, [ebp - 0xce]
push esi
push eax
mov dword [ebp - 0x140], esi
call fcn.005474c0
add esp, 0xc
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0x140]
push eax
push 0x34
mov dword [ebp - 0x138], 0x65
call edi
test eax, eax
je 0x460e78
lea edi, [ebp - 0xd0]
cmp word [ebp - 0xd0], si
je 0x460e78
cmp esi, 0x14
jge 0x460e78
push 0x10
push 0
push edi
call fcn.00549dcf
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x460e67
call fcn.0054b1b0
cmp dword [eax], 0x22
je 0x460e67
mov dword [ebp + esi*4 - 0x134], ebx
inc esi
push edi
call fcn.005472f1
lea edi, [edi + eax*2 + 2]
cmp word [edi], 0
pop ecx
jne 0x460e3d
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov edi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
movzx eax, ax
mov ecx, eax
and ecx, 0x3ff
mov ebx, 0xfc00
and eax, ebx
or eax, ecx
push eax
mov dword [ebp - 0x138], ecx
call edi
push dword [ebp - 0x138]
mov dword [ebp + esi*4 - 0x134], eax
call edi
mov dword [ebp + esi*4 - 0x130], eax
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
movzx eax, ax
mov ecx, eax
and ecx, 0x3ff
and eax, ebx
or eax, ecx
push eax
mov dword [ebp - 0x138], ecx
call edi
push dword [ebp - 0x138]
mov dword [ebp + esi*4 - 0x12c], eax
call edi
mov dword [ebp + esi*4 - 0x128], eax
add esi, 4
cmp dword [0x5f5f8c], 0
jne 0x460f03
mov dword [ebp + esi*4 - 0x134], 0x800
inc esi
xor edi, edi
test esi, esi
jle 0x460f2c
push dword [ebp + edi*4 - 0x134]
mov ecx, dword [ebp - 0x144]
push dword [ebp - 0x13c]
call fcn.0046078e
pop ecx
pop ecx
test eax, eax
jne 0x460f2e
inc edi
cmp edi, esi
jl 0x460f09
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00545559
leave
ret 8
Function at 0x462d59
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x462da1
call fcn.004517b3
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x462da1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x462de4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
test ebx, ebx
je 0x462dcd
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x462dcd
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x68], 0
je 0x462de1
mov ecx, dword [esi + 0x68]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x4677f3
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x5e9750]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, 0x105
push esi
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x467828
xor eax, eax
jmp 0x46787b
lea eax, [ebp - 0x210]
push eax
call fcn.005472f1
cmp word [ebp + eax*2 - 0x212], 0x5c
pop ecx
je 0x467859
push 0x5bb0ac
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.0054cc39
add esp, 0xc
test eax, eax
jne 0x467824
push edi
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.0054cc39
add esp, 0xc
test eax, eax
jne 0x467824
lea eax, [ebp - 0x210]
push eax
call fcn.0044910e
pop ecx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00545559
leave
ret

Function at 0x4d9465
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 4], ecx
test esi, esi
jne 0x4d947f
call fcn.004517b3
mov esi, dword [eax + 0xc]
push dword [0x5f81d0]
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
jne 0x4d949d
xor eax, eax
pop edi
pop esi
leave
ret 8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp + 0xc], eax
test eax, eax
je 0x4d9495
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
jne 0x4d94ca
xor esi, esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop ebx
jmp 0x4d9497
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp - 4]
push eax
push ebx
call fcn.004d9393
mov esi, eax
jmp 0x4d94bc

Function at 0x5263b5
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov edi, edi
push esi
mov esi, ecx
call fcn.0044c188
call fcn.0043a790
cmp eax, esi
pop esi
jne 0x5263d1
mov ecx, 0x5f62d0
jmp fcn.00468366
ret
Function at 0x545559
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5e9750]
jne 0x545563
repz ret
jmp fcn.0054f589

Function at 0x55b29d
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5e9750]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0054efab
and dword [ebp - 0x14], 0
cmp dword [0x5fa624], 0
mov dword [ebp - 0x18], eax
jne 0x55b350
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x55b3f8
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x5b6754
push ebx
call edi
test eax, eax
je 0x55b3f8
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x5b6744
push ebx
mov dword [0x5fa624], eax
call edi
push eax
call esi
push 0x5b6730
push ebx
mov dword [0x5fa628], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x5fa62c], eax
call edi
push eax
call esi
mov dword [0x5fa634], eax
test eax, eax
je 0x55b350
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x5fa630], eax
mov eax, dword [0x5fa630]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x55b3a9
cmp dword [0x5fa634], ecx
je 0x55b3a9
push eax
call esi
push dword [0x5fa634]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x55b3a9
test ebx, ebx
je 0x55b3a9
call edi
test eax, eax
je 0x55b3a0
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x55b3a0
test byte [ebp - 8], 1
jne 0x55b3a9
or dword [ebp + 0x10], 0x200000
jmp 0x55b3dc
mov eax, dword [0x5fa628]
cmp eax, dword [ebp - 0x18]
je 0x55b3dc
push eax
call esi
test eax, eax
je 0x55b3dc
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x55b3dc
mov eax, dword [0x5fa62c]
cmp eax, dword [ebp - 0x18]
je 0x55b3dc
push eax
call esi
test eax, eax
je 0x55b3dc
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x5fa624]
call esi
test eax, eax
je 0x55b3f8
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x55b3fa
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00545559
leave
ret

Function at 0x569920
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, ecx
cmp dword [esi + 0x1c], 0
jne 0x569934
call fcn.00569840
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 8
mov edx, dword [eax + 0x10]
lea edx, [edx + edx + 2]
jb 0x569948
mov ecx, dword [eax]
jmp 0x56994a
mov ecx, eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 8
jb 0x569955
mov eax, dword [eax]
push edx
push ecx
push 1
push 0
push eax
mov eax, dword [esi + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop esi
test eax, eax
je 0x569987
push 0x50000
push eax
lea ecx, [ebp - 0x14]
call fcn.00569510
push 0x5db680
lea ecx, [ebp - 0x14]
push ecx
call fcn.0054739b
mov esp, ebp
pop ebp
ret 8
Function at 0x569a90
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x582258
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x5e9750]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
cmp dword [edi + 0x1c], ebx
jne 0x569acf
call fcn.00569840
mov esi, dword [ebp + 0xc]
cmp dword [esi + 0x14], 8
jb 0x569adc
mov eax, dword [esi]
jmp 0x569ade
mov eax, esi
lea ecx, [ebp - 0x10]
push ecx
push ebx
lea edx, [ebp - 0x14]
push edx
push ebx
push eax
mov eax, dword [edi + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
je 0x569b13
push 0x50000
push eax
lea ecx, [ebp - 0x28]
call fcn.00569510
push 0x5db680
lea ecx, [ebp - 0x28]
push ecx
call fcn.0054739b
cmp dword [ebp - 0x14], 1
je 0x569b39
push 0x50000
push 0x65d
lea ecx, [ebp - 0x28]
call fcn.00569510
push 0x5db680
lea edx, [ebp - 0x28]
push edx
call fcn.0054739b
mov eax, dword [ebp - 0x10]
lea ecx, [ebp + 0xc]
push ecx
inc eax
push eax
lea ecx, [ebp - 0x24]
mov dword [ebp + 0xc], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
call fcn.00404140
cmp dword [esi + 0x14], 8
mov dword [ebp - 4], ebx
jb 0x569b63
mov eax, dword [esi]
jmp 0x569b65
mov eax, esi
mov esi, dword [ebp - 0x24]
lea edx, [ebp - 0x10]
push edx
push esi
push ebx
push ebx
push eax
mov eax, dword [edi + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
je 0x569b9a
push 0x50000
push eax
lea ecx, [ebp - 0x3c]
call fcn.00569510
push 0x5db680
lea ecx, [ebp - 0x3c]
push ecx
call fcn.0054739b
mov edi, dword [ebp + 8]
xor edx, edx
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], ebx
mov eax, esi
mov word [edi], dx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x569bb1
sub eax, edx
sar eax, 1
push eax
push esi
mov ecx, edi
call fcn.00418f80
cmp esi, ebx
je 0x569bd6
push esi
call fcn.0044663b
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x56a649
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
call fcn.0056a645
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x56a666
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
inc esi
mov eax, esi
pop esi
pop ebp
ret 4
Function at 0x56ad50
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor ecx, ecx
push 2
mov eax, 0x410
pop edx
xor ebx, ebx
mov esi, eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00446646
mov edi, eax
pop ecx
test edi, edi
jne 0x56ad93
xor ecx, ecx
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00446646
pop ecx
mov edi, eax
push edi
lea eax, [esi - 1]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor edx, edx
lea ecx, [esi + esi]
mov word [ecx + edi - 2], dx
test eax, eax
je 0x56adc7
push edi
cmp eax, esi
jle 0x56adbc
mov esi, ecx
call fcn.0044663b
xor edi, edi
jmp 0x56ad75
mov ecx, dword [ebp + 8]
xor ebx, ebx
inc ebx
call fcn.0043a530
test edi, edi
je 0x56add2
push edi
call fcn.0044663b
pop ecx
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret
Function at 0x56c439
Capabilities:
Clear file content

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0xc]
cmp eax, 0xffffffff
jne 0x56c45f
mov ecx, dword [esi + 0x14]
test ecx, ecx
je 0x56c48e
push dword [esi + 0x10]
mov eax, dword [ecx]
push dword [esi + 8]
push 0x43
push 0x5ba830
call dword [eax + 4]
jmp 0x56c48e
and dword [esi + 8], 0
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x56c48e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
test ecx, ecx
je 0x56c48e
push dword [esi + 0x10]
mov edx, dword [ecx]
push eax
push 0x50
push 0x5ba830
call dword [edx + 4]
mov eax, dword [esi + 8]
pop esi
ret

Function at 0x56c493
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
mov esi, ecx
test ebx, ebx
je 0x56c541
cmp dword [esi + 0xc], 0xffffffff
push edi
sete al
mov dword [ebp - 4], eax
test eax, eax
je 0x56c4d4
mov eax, dword [esi]
mov edi, dword [esi + 4]
push 1
call dword [eax + 0x34]
mov dword [esi + 4], edi
test eax, eax
je 0x56c4d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 8], eax
jmp 0x56c540
and dword [ebp + 8], 0
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp + 8]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
call edi
test eax, eax
jne 0x56c50f
mov ecx, dword [ebp + 8]
xor edx, edx
add eax, dword [ebp - 8]
adc ecx, edx
mov dword [ebx], eax
mov dword [ebx + 4], ecx
xor edi, edi
jmp 0x56c531
call edi
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
test ecx, ecx
je 0x56c52e
push dword [esi + 0x10]
mov edx, dword [ecx]
push eax
push 0x87
push 0x5ba830
call dword [edx + 4]
mov edi, dword [esi + 8]
cmp dword [ebp - 4], 0
je 0x56c53e
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x1c]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x56c6fd
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push dword [esi + 4]
mov eax, dword [esi]
call dword [eax + 0x34]
mov eax, dword [esi + 0xc]
cmp eax, 0xffffffff
je 0x56c750
and dword [esi + 8], 0
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x56c750
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
test ecx, ecx
je 0x56c750
push dword [esi + 0x10]
mov edx, dword [ecx]
push eax
push 0x170
push 0x5ba830
call dword [edx + 4]
mov eax, dword [esi + 8]
pop esi
pop ebp
ret 0xc
Function at 0x56c758
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
cmp dword [ebp + 8], edi
je 0x56c7d6
mov ebx, dword [ebp + 0x10]
cmp ebx, edi
je 0x56c7d6
cmp dword [ebp + 0xc], edi
jbe 0x56c782
push dword [ebp + 0xc]
push edi
push dword [ebp + 8]
call fcn.005474c0
add esp, 0xc
mov dword [ebx], edi
push dword [esi + 4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x34]
mov eax, dword [esi + 0xc]
cmp eax, 0xffffffff
jne 0x56c79b
mov eax, dword [esi + 8]
jmp 0x56c7d9
push edi
push ebx
push dword [ebp + 0xc]
mov dword [esi + 8], edi
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x56c796
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, edi
je 0x56c796
push dword [esi + 0x10]
mov edx, dword [ecx]
push eax
push 0x196
push 0x5ba830
call dword [edx + 4]
jmp 0x56c796
or eax, 0xffffffff
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x56d0ae
Capabilities:
Get disk size
Get system information on windows

Disassembly:
push 0x40
mov eax, 0x582b30
call fcn.0054791e
mov esi, ecx
mov dword [ebp - 0x18], esi
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0056c39a
mov eax, dword [ebp + 0x10]
xor ebx, ebx
and eax, 1
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 4], ebx
mov dword [esi], vtable.CPortableUnBufWinPFile.0
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], ebx
mov dword [esi + 8], ebx
mov dword [ebp + 8], 0x20000
cmp eax, ebx
je 0x56d18e
push ebx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0056a9c9
add esp, 0xc
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x24]
mov byte [ebp - 4], 1
mov dword [ebp - 0x14], ebx
mov dword [ebp + 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x56d159
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x38], eax
jmp 0x56d183
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [esi + 8], eax
cmp ecx, ebx
je 0x56d17c
push dword [esi + 0x10]
mov edx, dword [ecx]
push eax
push 0xd6
push str.CPortableUnBufWinPFile.cpp
call dword [edx + 4]
mov dword [esi + 0x38], 0x200
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], bl
call fcn.0043a030
push 8
pop ecx
xor eax, eax
mov dword [ebp - 0x4c], ebx
lea edi, [ebp - 0x48]
push 0x24
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x4c]
push ebx
push eax
call fcn.005474c0
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov dword [esi + 0x40], ecx
cmp ecx, 0x20000
jbe 0x56d1c5
mov dword [ebp + 8], ecx
mov eax, dword [ebp + 8]
xor edx, edx
div ecx
push dword [ebp + 0xc]
imul eax, ecx
mov ecx, esi
mov dword [esi + 0x3c], eax
call fcn.0056cdc5
cmp dword [esi + 0xc], 0xffffffff
je 0x56d1ed
lea eax, [esi + 0x30]
push eax
mov ecx, esi
call fcn.0056c493
mov eax, esi
call fcn.005479f6
ret 0x10
Function at 0x56e10c
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
and dword [ebp - 0x30], 0
push ebx
push esi
push edi
push 8
mov ebx, ecx
pop ecx
xor eax, eax
push 0x24
lea edi, [ebp - 0x2c]
push eax
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x30]
push eax
call fcn.005474c0
add esp, 0xc
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x2c]
mov edi, 0x20000
mov esi, 0x5fae70
cmp ecx, edi
ja 0x56e15e
xor edx, edx
lea eax, [ecx + 0x5fae6f]
div ecx
mov esi, eax
imul esi, ecx
mov dword [ebp - 4], 5
and dword [ebp - 8], 0
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], esi
push eax
lea ecx, [ebx + 4]
add esi, edi
call fcn.0056e0a6
dec dword [ebp - 4]
jne 0x56e165
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret

Function at 0x56e21b
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x834
mov eax, dword [0x5e9750]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov eax, ecx
mov ecx, dword [ebp + 0xc]
push ecx
push dword [eax + 0x30]
lea eax, [ebp - 0x834]
push 2
push 1
push eax
call fcn.0056afcc
add esp, 0x14
test byte [ebp + 8], 0x10
jne 0x56e299
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push dword [ebp - 0x830]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov esi, ecx
cmp eax, 0xffffffff
je 0x56e285
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x834]
call fcn.0043a030
xor eax, eax
test esi, esi
sete al
jmp 0x56e30e
xor eax, eax
push 0x81e
push eax
mov word [ebp - 0x824], ax
lea eax, [ebp - 0x822]
push eax
call fcn.005474c0
add esp, 0xc
lea eax, [ebp - 0x824]
push eax
push 0x40f
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x56e300
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push edi
push dword [ebp - 0x830]
call esi
mov edi, eax
test edi, edi
je 0x56e2eb
lea eax, [ebp - 0x824]
push eax
call esi
lea ecx, [ebp - 0x834]
call fcn.0043a030
xor eax, eax
test edi, edi
sete al
pop edi
jmp 0x56e30e
lea ecx, [ebp - 0x834]
call fcn.0043a030
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00545559
leave
ret 8
Function at 0x56e483
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x26c
mov eax, dword [0x5e9750]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
push 0x24c
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x250]
push edi
push eax
mov esi, ecx
mov dword [ebp - 0x258], 1
mov dword [ebp - 0x254], edi
call fcn.005474c0
push 0x250
lea eax, [ebp - 0x254]
push edi
push eax
call fcn.005474c0
mov eax, dword [esi + 0x3c]
add esp, 0x18
cmp eax, 0xffffffff
jne 0x56e52f
push dword [esi + 8]
lea eax, [ebp - 0x26c]
push dword [esi + 0x30]
push 2
push 1
push eax
call fcn.0056afcc
add esp, 0x14
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esi + 0x3c], eax
cmp eax, 0xffffffff
jne 0x56e522
mov dword [ebp - 0x258], edi
lea ecx, [ebp - 0x26c]
call fcn.0043a030
jmp 0x56e543
lea ecx, [ebp - 0x254]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x258], edi
je 0x56e5fa
lea eax, [ebp - 0x228]
push eax
lea ecx, [esi + 0x40]
call fcn.0043a530
lea eax, [ebp - 0x20]
push eax
mov ecx, ebx
call fcn.0043a530
mov eax, dword [ebp - 0x254]
mov dword [esi + 0x50], eax
cmp dword [ebp - 0x24c], edi
jne 0x56e587
cmp dword [ebp - 0x250], edi
jne 0x56e587
xor eax, eax
inc eax
jmp 0x56e589
xor eax, eax
mov ecx, dword [ebp - 0x25c]
mov dword [ecx], eax
cmp eax, edi
lea eax, [ebp - 0x248]
jne 0x56e5a1
lea eax, [ebp - 0x250]
push eax
lea ecx, [esi + 0x54]
call fcn.0056ef1d
lea eax, [ebp - 0x248]
push eax
lea ecx, [esi + 0x64]
call fcn.0056ef1d
lea eax, [ebp - 0x240]
push eax
lea ecx, [esi + 0x74]
call fcn.0056ef1d
mov ecx, dword [ebp - 0x238]
xor eax, eax
xor edi, edi
add eax, dword [ebp - 0x234]
adc ecx, edi
test byte [esi + 0x50], 0x10
mov dword [esi + 0x88], eax
mov dword [esi + 0x8c], ecx
je 0x56e5fa
or dword [esi + 0x88], 0xffffffff
or dword [esi + 0x8c], 0xffffffff
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp - 4]
pop edi
mov dword [esi + 0x90], eax
pop esi
xor ecx, ebp
pop ebx
call fcn.00545559
leave
ret 8

Function at 0x56f883
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
mov eax, esi
shr eax, 4
inc eax
movzx eax, ax
push 6
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x56f8f3
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x56f8f2
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x56f8eb
movzx ecx, word [eax]
add eax, 2
and esi, 0xf
je 0x56f8d9
movzx ecx, cx
lea eax, [eax + ecx*2]
movzx ecx, word [eax]
add eax, 2
dec esi
jne 0x56f8ca
test cx, cx
je 0x56f8eb
movzx ecx, cx
push ecx
mov ecx, dword [ebp + 0x10]
push eax
call fcn.00418f80
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop esi
pop ebp
ret
Function at 0x572bba
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x572be1
call fcn.0054b1c3
mov dword [eax], esi
call fcn.0054b1b0
push 0x16
pop esi
mov dword [eax], esi
call fcn.0054f878
mov eax, esi
jmp 0x572c36
test dword [ebp + 0xc], 0xfffffff9
jne 0x572bc7
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x572c0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0054b1d6
pop ecx
call fcn.0054b1b0
mov eax, dword [eax]
jmp 0x572c36
test al, 0x10
jne 0x572c34
test al, 1
je 0x572c34
test byte [ebp + 0xc], 2
je 0x572c34
call fcn.0054b1c3
mov dword [eax], 5
call fcn.0054b1b0
mov dword [eax], 0xd
jmp 0x572c05
xor eax, eax
pop esi
pop ebp
ret