joyce8/EMBER2024-capa huggingface dataset:
Function at 0x52efe0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b61be
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x6244f8]
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 esi, dword [ebp + 8]
xor edx, edx
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], 0
mov dword [esi], edx
mov dword [esi + 4], edx
mov dword [esi + 8], edx
mov dword [ebp - 4], edx
mov dword [ebp - 0x20], edx
lea edx, [ebp - 0x20]
push edx
push dword [ebp + 0x14]
mov dword [ebp - 0x30], 1
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x52f19c
push eax
push eax
push eax
push eax
push eax
push eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x52f193
mov eax, dword [ebp - 0x24]
xor ecx, ecx
inc eax
mov edx, 2
xor ebx, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00538f33
add esp, 4
mov edi, eax
cmp dword [ebp - 0x14], ebx
jbe 0x52f18a
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], 0
push eax
push edi
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov ecx, eax
xor edx, edx
mov eax, dword [ebp - 0x28]
mov word [edi + eax*2], dx
test ecx, ecx
jne 0x52f180
call fcn.0053955f
test eax, eax
je 0x52f1ba
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x2c], eax
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 1
call fcn.00404e26
test al, al
jne 0x52f139
test edi, edi
jne 0x52f11a
xor eax, eax
jmp 0x52f12f
mov eax, edi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x52f120
sub eax, edx
sar eax, 1
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.004054b5
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 2
push ecx
cmp eax, dword [esi + 8]
je 0x52f159
mov ecx, eax
call fcn.004637c0
add dword [esi + 4], 4
jmp 0x52f161
push eax
mov ecx, esi
call fcn.00406781
mov edx, dword [ebp - 0x2c]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x52f180
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
inc ebx
cmp ebx, dword [ebp - 0x14]
jb 0x52f0a3
push edi
call fcn.00538f2e
add esp, 4
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
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.0056e41f
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404e00
int3
Function at 0x530570
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 4]
test esi, esi
je 0x5305ba
mov eax, dword [edi + 0x28]
test eax, eax
je 0x5305ba
push ebx
xor ebx, ebx
test eax, eax
je 0x5305b9
add esi, 0x29
lea esp, [esp]
lea ecx, [eax - 1]
xor edx, edx
mov eax, 0xff
lea esi, [esi + 4]
div ecx
movzx ecx, bl
inc ebx
movzx eax, al
imul eax, ecx
mov byte [esi - 3], al
mov byte [esi - 4], al
mov byte [esi - 5], al
mov eax, dword [edi + 0x28]
cmp ebx, eax
jb 0x530590
pop ebx
pop edi
pop esi
ret

Function at 0x5310d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx + 4]
test eax, eax
jne 0x5310de
pop ebp
ret 0xc
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0057ee68
add esp, 0x10
pop ebp
ret 0xc

Function at 0x53bd62
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
xor esi, esi
mov ebx, ecx
push edi
cmp dword [ebp + 8], esi
je 0x53bda1
call fcn.00545615
push 0xf0
push dword [ebp + 8]
mov edi, dword [eax + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x53bda1
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x53bda9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
push esi
mov ecx, ebx
call fcn.005389ae
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x53c624
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, ecx
push edi
test esi, esi
je 0x53c6b0
cmp dword [esi + 0x20], 0
je 0x53c6b0
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x53c6b0
cmp dword [ebp + 8], 0
je 0x53c6b0
xor edi, edi
mov ebx, edi
call fcn.00545615
push 0x5e7d00
push dword [ebp + 8]
mov eax, dword [eax + 0xc]
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 8], eax
test eax, eax
je 0x53c694
mov ebx, dword [ebp - 4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 8]
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x53c6b0
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
push edi
push ebx
push esi
call fcn.0055f0a8
mov edi, eax
add esp, 0xc
test edi, edi
je 0x53c6ac
mov ecx, esi
call fcn.0053c3c2
mov eax, edi
jmp 0x53c6b2
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x540efa
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x5a334d
call fcn.0056e45f
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 0x74], ebx
jne 0x540f20
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [edi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x540f7a
lea ecx, [ebp - 0x10]
call fcn.00404c17
mov edi, dword [edi + 0x74]
lea ecx, [ebp - 0x10]
push ecx
mov dword [ebp - 4], ebx
mov eax, dword [edi]
mov esi, dword [eax + 0x8c]
mov ecx, esi
call dword [0x5baa98]
mov ecx, edi
call esi
mov esi, dword [ebp + 8]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push esi
call fcn.00588756
push eax
call fcn.00404d1a
add esp, 0x14
test esi, esi
je 0x540f6d
push esi
call fcn.00574cc3
pop ecx
mov ebx, eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.00405472
mov eax, ebx
call fcn.0056e42d
ret 8

Function at 0x541780
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [edi + 0x84], ebx
test ebx, 0xffff0000
jne 0x5417ab
cmp dword [edi + 0x80], 0
jne 0x5417ab
movzx eax, bx
mov dword [edi + 0x80], eax
call fcn.00545615
push 5
push ebx
mov esi, dword [eax + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push dword [ebp + 0xc]
mov ecx, edi
push eax
call fcn.005419d8
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x544333
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
push edi
cmp dword [ecx + 0x58], esi
je 0x544386
push esi
push dword [ebp + 8]
call fcn.0054451c
mov edi, eax
test edi, edi
je 0x544381
lea eax, [ebp - 4]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x544381
mov eax, dword [ebp - 8]
jmp 0x544398
mov eax, dword [ebp + 0x10]
jmp 0x544398
push dword [ecx + 0x6c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
pop edi
pop esi
leave
ret 0xc
Function at 0x54e192
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor edi, edi
mov eax, ecx
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], edi
je 0x54e1d7
call fcn.00545615
push 0xf0
push dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x54e1d4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x54e21e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov eax, dword [ebp - 4]
push ebx
xor ebx, ebx
inc ebx
test edi, edi
je 0x54e1fa
mov ecx, dword [eax]
push dword [ebp + 0x10]
push edi
mov esi, dword [ecx + 0x20]
mov ecx, esi
push dword [ebp + 8]
call dword [0x5baa98]
mov ecx, dword [ebp - 4]
call esi
mov ebx, eax
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x70]
test edi, edi
je 0x54e21b
mov edx, dword [edi]
push dword [ebp + 0x10]
mov esi, dword [edx + 0xa0]
mov ecx, esi
call dword [0x5baa98]
mov ecx, edi
call esi
mov eax, ebx
pop ebx
pop edi
pop esi
leave
ret 0xc

Function at 0x55a63b
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov dword [ebp - 4], ecx
call fcn.00545615
push 0xf1
push dword [ebp + 8]
mov esi, dword [eax + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x55a70c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x55a70c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x55a70c
movzx eax, word [edi + 6]
xor ecx, ecx
push ebx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00538f33
pop ecx
movzx ecx, word [edi + 6]
xor esi, esi
xor edx, edx
mov ebx, eax
mov eax, ecx
cmp si, cx
jae 0x55a6c6
lea ecx, [edi + 8]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov dword [ebx + edx*4], eax
inc edx
movzx esi, word [edi + 6]
cmp edx, esi
jl 0x55a6b2
mov eax, esi
mov ecx, dword [ebp - 4]
movzx eax, ax
push eax
push ebx
call fcn.0055a714
push ebx
mov esi, eax
call fcn.00538f2e
pop ecx
test esi, esi
je 0x55a707
movzx ecx, word [edi + 4]
movzx esi, word [edi + 2]
push ecx
push esi
lea eax, [ecx + 7]
mov ecx, dword [ebp - 4]
lea edx, [esi + 7]
push eax
push edx
call fcn.0055a89b
push dword [ebp + 8]
mov ecx, dword [ebp - 4]
call fcn.0055a5ea
mov esi, eax
mov eax, esi
pop ebx
jmp 0x55a70e
xor eax, eax
pop edi
pop esi
leave
ret 4

Function at 0x55c6e0
Capabilities:
Create http request

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, ecx
and dword [esi + 0x10], 0
and dword [esi + 0xc], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
mov dword [esi], vtable.CInternetSession.0
test eax, eax
jne 0x55c709
call fcn.00545615
mov eax, dword [eax + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esi + 8], eax
test eax, eax
je 0x55c736
push esi
push eax
mov ecx, 0x62f284
call fcn.0055d550
mov eax, esi
pop esi
pop ebp
ret 0x18
push 0
push dword [esi + 4]
call fcn.0055cb4e
int3
Function at 0x56462f
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [esp + 8]
push esi
push edi
xor edi, edi
movzx eax, word [ecx + 0x14]
movzx esi, word [ecx + 6]
test esi, esi
lea eax, [eax + ecx + 0x18]
jbe 0x56466a
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x564651
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
cmp dword [esp + 0xc], edx
jb 0x564662
add edx, ecx
cmp dword [esp + 0xc], edx
jb 0x56466c
inc edi
add eax, 0x28
cmp edi, esi
jb 0x564647
xor eax, eax
pop edi
pop esi
ret

Function at 0x564b64
Capabilities:
Inspect section memory permissions

Disassembly:
popal
mov ecx, 0x3c7e8bbe
add edi, esi
mov dword [ebp - 0x88], edi
mov eax, dword [edi + 0x80]
cmp eax, ebx
je 0x564dde
add eax, esi
mov dword [ebp - 0x44], eax
cmp dword [eax + 4], ebx
jne 0x564b94
cmp dword [eax + 0xc], ebx
je 0x564c37
mov edi, dword [eax + 0xc]
add edi, esi
push edi
call dword [ebp - 0xc0]
mov dword [ebp + 0xc], eax
call fcn.005645ef
adc al, byte [ecx]
test byte [ebx], 0x39
pop ebp
or al, 0x75
adc dl, byte [edi - 1]
xchg ebp, eax
dec eax
invalid
call fcn.005645ef
mov cl, 0xb2
invalid
push 0x8000
push ebx
push esi
call dword [ebp - 8]
xor eax, eax
Function at 0x57f6ca
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0056ed20
mov eax, dword [0x6244f8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0058cbc6
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x57f70c
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x57f868
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0056f210
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x6300d8]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00596ea7
mov ecx, dword [esi*4 + 0x6300d8]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x57f861
cmp eax, dword [edi + ecx + 0x24]
jne 0x57f861
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x57f861
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00596ea7
add esp, 0x14
test edx, edx
jl 0x57f861
jg 0x57f7d7
test eax, eax
jb 0x57f861
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x57f861
jl 0x57f7f1
cmp dword [ebp - 0x1008], eax
ja 0x57f861
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x57f80f
test ebx, ebx
je 0x57f848
cmp ecx, edi
jae 0x57f848
mov al, byte [ecx]
cmp al, 0xd
jne 0x57f829
lea eax, [edi - 1]
cmp ecx, eax
jae 0x57f835
cmp byte [ecx + 1], 0xa
jne 0x57f835
inc ecx
jmp 0x57f835
movzx eax, al
movsx eax, byte [eax + 0x624968]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x57f80f
cmp edx, ebx
jne 0x57f80f
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x57f866
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0056e41f
leave
ret

Function at 0x5916b1
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5f0f1c
push 0x5f0f14
push 0x5ee5d8
push 0x1e
call fcn.005914de
mov esi, eax
add esp, 0x10
test esi, esi
je 0x5916e5
push dword [ebp + 8]
mov ecx, esi
call dword [0x5baa98]
call esi
jmp 0x5916eb
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x59172f
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5f0f2c
push 0x5f0f24
push 0x5ee5fc
push 0x20
call fcn.005914de
mov esi, eax
add esp, 0x10
test esi, esi
je 0x591766
push dword [ebp + 8]
mov ecx, esi
call dword [0x5baa98]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x59632f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00595fd1

Function at 0x59633a
Capabilities:
Read file on windows

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

Function at 0x596345
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x6300d8]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x596385
cmp byte [ebx], 0xa
jne 0x596385
or byte [eax + edi + 0x28], 4
jmp 0x59638a
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x596488
mov al, byte [edx]
cmp al, 0x1a
je 0x59646a
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x5963b9
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x5963de
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x5963e8
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x59639b
jmp 0x596488
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x596465
cmp dword [ebp - 0xc], 0
je 0x596465
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x6300d8]
test byte [eax + edi + 0x28], 0x48
je 0x59643f
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x59642a
mov byte [esi], dl
jmp 0x59643b
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x6300d8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x596488
cmp byte [ebp - 1], 0xa
jne 0x59644e
cmp esi, ebx
jne 0x59644e
mov byte [esi], 0xa
jmp 0x596487
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00596ec5
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x596488
mov byte [esi], 0xd
jmp 0x596487
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x6300d8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x596484
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x596488
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x596491
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x6300d8]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x5964d4
cmp word [esi], dx
jne 0x5964d4
or byte [edi + eax + 0x28], 4
jmp 0x5964d9
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x59662c
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x59660c
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x59651b
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x596551
cmp eax, edx
jae 0x59655d
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x5964f3
jmp 0x59662c
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x596608
cmp dword [ebp - 0x14], 0
je 0x596608
mov eax, dword [ebx*4 + 0x6300d8]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x5965e0
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x5965a9
mov word [esi], cx
jmp 0x5965dc
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x6300d8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x6300d8]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x6300d8]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x59662c
pop ebx
cmp word [ebp - 4], bx
jne 0x5965f1
cmp esi, dword [ebp + 0xc]
jne 0x5965f1
mov word [esi], bx
jmp 0x596629
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00596ec5
add esp, 0x10
cmp word [ebp - 4], bx
je 0x59662c
push 0xd
jmp 0x596625
mov ecx, dword [ebx*4 + 0x6300d8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x596623
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x59662c
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x59a538
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x6244f8]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x59a583
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0059a6d7
test al, al
jne 0x59a57d
sub edx, 2
cmp edx, edi
jne 0x59a563
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x59a5a5
lea eax, [edi + 2]
cmp edx, eax
je 0x59a5a5
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0059a484
add esp, 0x10
jmp 0x59a69f
push esi
lea ecx, [ebp - 0x255]
call fcn.0059a6d7
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x59a5e8
push dword [ebp - 0x25c]
jmp 0x59a595
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x59a625
cmp word [ebp - 0x226], 0
je 0x59a646
cmp word [ebp - 0x226], ax
jne 0x59a625
cmp word [ebp - 0x224], 0
je 0x59a646
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0059a484
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x59a692
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x59a5ff
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x59a67a
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x59a69f
push 0x59a2b4
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00589400
add esp, 0x10
jmp 0x59a66f
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0056e41f
leave
ret

Function at 0x59afaa
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x59afbb
pop esi
ret
push ebx
push edi
push esi
call fcn.0059af73
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00591192
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x59afe3
push ebx
push esi
push edi
call fcn.00570860
add esp, 0xc
push 0
call fcn.00591158
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x59b3a7
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0059aff8