joyce8/EMBER2024-capa huggingface dataset:
Function at 0x501cd0
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x88
mov eax, dword [0x57906c]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
mov ebx, dword [esp + 0x90]
push ebp
push esi
push edi
mov eax, dword [ebx + 0xc]
mov edi, dword [eax + 0x450]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x80
lea eax, [esp + 0x18]
push eax
mov eax, dword [edi + 0x13c]
push 0
add eax, 4
push eax
push dword [edi + 0x148]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x130], 0
mov dword [edi + 0x134], eax
jne 0x501d56
push dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
lea eax, [edi + 0xb0]
push eax
call fcn.00516430
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [edi + 0x130], eax
mov edx, dword [edi + 0x134]
cmp edx, 4
jge 0x501d91
push str.Received_too_short_packet
push ebx
call fcn.004db290
add esp, 8
mov dword [edi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004c61ad
add esp, 0x88
ret
mov eax, dword [edi + 0x148]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
mov dword [edi + 0xc], ecx
add ecx, 0xfffffffd
cmp ecx, 3
ja case.default.0x501db2
jmp dword [ecx*4 + 0x501ed0]
cmp edx, 4
jle case.0x501db2.4
mov esi, dword [edi + 0x148]
movzx ecx, byte [esi + 2]
movzx eax, byte [esi + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 0x144]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x501db2.4
lea eax, [edx - 4]
push eax
lea eax, [esi + 4]
push eax
push 1
push ebx
call fcn.004db1e0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x501e13
push 5
push edi
call fcn.005027d0
add esp, 8
mov eax, esi
jmp 0x501d78
mov eax, dword [edi + 0x134]
sub eax, 4
cdq
add dword [ebx + 0x90], eax
adc dword [ebx + 0x94], edx
push dword [ebx + 0x94]
push dword [ebx + 0x90]
push ebx
call fcn.004eb2c0
jmp 0x501ea5
mov eax, dword [edi + 0x148]
lea esi, [edx - 4]
push esi
movzx ecx, byte [eax + 2]
lea ebp, [eax + 4]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
push ebp
mov dword [edi + 8], ecx
call fcn.00502840
add esp, 8
cmp eax, esi
jae case.0x501db2.4
push ebp
push str.TFTP_error:__s
push ebx
call fcn.004db360
jmp 0x501ea5
lea eax, [edx - 2]
push eax
mov eax, dword [edi + 0x148]
add eax, 2
push eax
push edi
call fcn.00501a90
add esp, 0xc
test eax, eax
je case.0x501db2.4
jmp 0x501d78
push str.Internal_error:_Unexpected_packet
push 0x56a978
push ebx
call fcn.004db290
add esp, 0xc
push ebx
call fcn.004eb6c0
add esp, 4
test eax, eax
je 0x501d76
push 5
push edi
call fcn.005027d0
add esp, 8
mov eax, 0x2a
jmp 0x501d78
Function at 0x50cfe0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x120
mov eax, dword [0x57906c]
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.004edce0
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jne 0x50d058
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004c7ba0
push eax
push edi
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push ebp
call fcn.004db290
add esp, 0x1c
lea esi, [ebx + 0x4d]
jmp 0x50d197
push 0
push 0x80
push 3
push 0
push 1
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x50d0aa
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004c7ba0
push eax
push edi
push str.schannel:_failed_to_open_CA_file__s:__s
push ebp
call fcn.004db290
add esp, 0x1c
mov esi, 0x4d
jmp 0x50d197
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x50d0ea
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004c7ba0
push eax
push edi
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push ebp
call fcn.004db290
add esp, 0x1c
mov esi, 0x4d
jmp 0x50d18d
mov edi, dword [esp + 0x24]
cmp dword [esp + 0x28], ebx
jl 0x50d118
jg 0x50d0fe
cmp edi, 0x100000
jbe 0x50d118
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push ebp
call fcn.004db290
add esp, 0xc
mov esi, 0x4d
jmp 0x50d18d
lea eax, [edi + 1]
push eax
call dword [0x5790a0]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x50d130
lea esi, [eax + 0x1b]
jmp 0x50d18d
test edi, edi
je 0x50d174
nop dword [eax]
nop dword [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 0x50d1d1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x50d1cd
add esi, eax
cmp esi, edi
jb 0x50d140
push ebp
push dword [esp + 0x18]
mov byte [edi + ebx], 0
push edi
push ebx
push dword [esp + 0x2c]
call fcn.0050cde0
add esp, 0x14
mov esi, eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [0x5790a4]
mov eax, dword [esp + 0x24]
add esp, 4
test eax, eax
je 0x50d1b2
push eax
call fcn.0051f38c
add esp, 4
mov ecx, dword [esp + 0x12c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004c61ad
add esp, 0x120
ret
mov edi, esi
jmp 0x50d174
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004c7ba0
push eax
push dword [esp + 0x24]
push str.schannel:_failed_to_read_from_CA_file__s:__s
push ebp
call fcn.004db290
add esp, 0x1c
mov esi, 0x4d
jmp 0x50d18d
Function at 0x513370
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [0x5790a0]
mov edi, eax
add esp, 4
test edi, edi
jne 0x513397
pop edi
pop esi
pop ecx
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [esp + 0x1c]
mov dword [edi + 8], eax
push ebp
cmp ebx, dword [esi + 0x10]
jbe 0x5133e2
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [esp + 0x24]
push dword [edi + 4]
call eax
mov ebp, dword [edi + 8]
push dword [edi + 4]
add ebp, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ebp
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov ecx, dword [edi + 4]
mov dword [esp + 0x20], ebx
jmp 0x5133e6
mov ebp, dword [esp + 0x1c]
mov eax, dword [esi]
push ecx
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [esp + 0x28]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x513446
mov dword [esp + 0x10], eax
mov ebx, eax
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x24], al
lea eax, [esp + 0x24]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub ebx, 1
jne 0x513405
mov ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0x10]
jae 0x513477
nop dword [eax + eax]
mov eax, dword [esi + 4]
push 1
push 0x555ab8
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x555ab9
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x513450
pop ebp
pop ebx
mov eax, edi
pop edi
pop esi
pop ecx
ret
Function at 0x513480
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
push dword [esp + 0x20]
call fcn.004dda10
mov esi, dword [esp + 0x1c]
mov ebx, eax
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x14], ebx
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
lea ecx, [ecx + edx*2]
add ecx, 0xc
push ecx
call dword [0x5790a0]
mov edi, eax
add esp, 8
test edi, edi
je 0x5135e8
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
mov dword [edi + 8], eax
cmp ebx, dword [esi + 0x10]
jbe 0x5134fc
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push ebp
push dword [edi + 4]
call eax
mov ebp, dword [edi + 8]
push dword [edi + 4]
add ebp, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ebp
call eax
mov eax, dword [esi + 0x14]
add esp, 0x18
mov ecx, dword [edi + 4]
mov dword [esp + 0x10], eax
mov eax, dword [esi]
push ecx
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [esp + 0x18]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x513561
mov dword [esp + 0x18], eax
mov ebx, eax
nop dword [eax + eax]
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x1c], al
lea eax, [esp + 0x1c]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x28], al
lea eax, [esp + 0x28]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub ebx, 1
jne 0x513520
mov ebx, dword [esp + 0x18]
cmp ebx, dword [esi + 0x10]
jae 0x51358d
mov eax, dword [esi + 4]
push 1
push 0x555ab8
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x555ab9
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x513566
push dword [esp + 0x28]
call fcn.004dda10
mov ecx, dword [edi]
push eax
push dword [esp + 0x2c]
push dword [edi + 4]
mov eax, dword [ecx + 4]
call eax
mov esi, dword [esp + 0x3c]
add esp, 0x10
mov ebx, dword [edi]
test esi, esi
jne 0x5135b8
mov esi, dword [ebx + 0xc]
add esi, dword [edi + 8]
push dword [edi + 4]
mov eax, dword [ebx + 8]
push esi
call eax
push dword [ebx + 0x14]
mov eax, dword [ebx + 4]
push esi
push dword [edi + 8]
call eax
push dword [edi + 8]
mov eax, dword [ebx + 8]
push esi
call eax
push edi
call dword [0x5790a4]
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
pop ecx
ret
Function at 0x526794
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x57906c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x557828
push esi
call fcn.0052ee98
pop ecx
pop ecx
test eax, eax
jne 0x5267c2
xor al, al
jmp 0x52683f
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.005264cb
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x5267fc
push dword [ebp - 0x210]
call fcn.0051f38c
xor al, al
jmp 0x52683d
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x526802
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x526822
push edx
call fcn.005266ca
pop ecx
test al, al
je 0x5267ed
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x526830
mov bl, 1
push dword [ebp - 0x210]
call fcn.0051f38c
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004c61ad
leave
ret
Function at 0x52ec2b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004c70e0
mov eax, dword [0x57906c]
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.00531cde
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x52ec6d
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x52edc9
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00540060
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 + 0x58d4f8]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0052fe79
mov ecx, dword [esi*4 + 0x58d4f8]
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 0x52edc2
cmp eax, dword [edi + ecx + 0x24]
jne 0x52edc2
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 0x52edc2
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0052fe79
add esp, 0x14
test edx, edx
jl 0x52edc2
jg 0x52ed38
test eax, eax
jb 0x52edc2
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x52edc2
jl 0x52ed52
cmp dword [ebp - 0x1008], eax
ja 0x52edc2
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x52ed70
test ebx, ebx
je 0x52eda9
cmp ecx, edi
jae 0x52eda9
mov al, byte [ecx]
cmp al, 0xd
jne 0x52ed8a
lea eax, [edi - 1]
cmp ecx, eax
jae 0x52ed96
cmp byte [ecx + 1], 0xa
jne 0x52ed96
inc ecx
jmp 0x52ed96
movzx eax, al
movsx eax, byte [eax + 0x5793b8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x52ed70
cmp edx, ebx
jne 0x52ed70
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x52edc7
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004c61ad
leave
ret

Function at 0x53060c
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x558d74
push 0x558d6c
push str.FlsAlloc
push 0x1e
call fcn.00530439
mov esi, eax
add esp, 0x10
test esi, esi
je 0x530640
push dword [ebp + 8]
mov ecx, esi
call dword [0x546444]
call esi
jmp 0x530646
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x53068a
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x558d84
push 0x558d7c
push str.FlsGetValue
push 0x20
call fcn.00530439
mov esi, eax
add esp, 0x10
test esi, esi
je 0x5306c1
push dword [ebp + 8]
mov ecx, esi
call dword [0x546444]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x534268
Capabilities:
Read file on windows

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

Function at 0x534273
Capabilities:
Read file on windows

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

Function at 0x5342da
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 + 0x58d4f8]
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 0x53431a
cmp byte [ebx], 0xa
jne 0x53431a
or byte [eax + edi + 0x28], 4
jmp 0x53431f
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x53441d
mov al, byte [edx]
cmp al, 0x1a
je 0x5343ff
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x53434e
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x534373
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x53437d
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 0x534330
jmp 0x53441d
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 0x5343fa
cmp dword [ebp - 0xc], 0
je 0x5343fa
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x58d4f8]
test byte [eax + edi + 0x28], 0x48
je 0x5343d4
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x5343bf
mov byte [esi], dl
jmp 0x5343d0
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x58d4f8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x53441d
cmp byte [ebp - 1], 0xa
jne 0x5343e3
cmp esi, ebx
jne 0x5343e3
mov byte [esi], 0xa
jmp 0x53441c
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0052fe97
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x53441d
mov byte [esi], 0xd
jmp 0x53441c
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x58d4f8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x534419
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x53441d
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x534426
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 + 0x58d4f8]
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 0x534469
cmp word [esi], dx
jne 0x534469
or byte [edi + eax + 0x28], 4
jmp 0x53446e
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 0x5345c1
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 0x5345a1
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x5344b0
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x5344e6
cmp eax, edx
jae 0x5344f2
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 0x534488
jmp 0x5345c1
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 0x53459d
cmp dword [ebp - 0x14], 0
je 0x53459d
mov eax, dword [ebx*4 + 0x58d4f8]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x534575
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x53453e
mov word [esi], cx
jmp 0x534571
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x58d4f8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x58d4f8]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x58d4f8]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x5345c1
pop ebx
cmp word [ebp - 4], bx
jne 0x534586
cmp esi, dword [ebp + 0xc]
jne 0x534586
mov word [esi], bx
jmp 0x5345be
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0052fe97
add esp, 0x10
cmp word [ebp - 4], bx
je 0x5345c1
push 0xd
jmp 0x5345ba
mov ecx, dword [ebx*4 + 0x58d4f8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5345b8
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5345c1
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 0x539483
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x57906c]
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 0x5394ce
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00539622
test al, al
jne 0x5394c8
sub edx, 2
cmp edx, edi
jne 0x5394ae
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x5394f0
lea eax, [edi + 2]
cmp edx, eax
je 0x5394f0
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.005393cf
add esp, 0x10
jmp 0x5395ea
push esi
lea ecx, [ebp - 0x255]
call fcn.00539622
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 0x539533
push dword [ebp - 0x25c]
jmp 0x5394e0
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 0x539570
cmp word [ebp - 0x226], 0
je 0x539591
cmp word [ebp - 0x226], ax
jne 0x539570
cmp word [ebp - 0x224], 0
je 0x539591
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.005393cf
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x5395dd
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x53954a
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x5395c5
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x5395ea
push 0x5391ff
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.0052e270
add esp, 0x10
jmp 0x5395ba
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.004c61ad
leave
ret

Function at 0x539f0e
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x539f1f
pop esi
ret
push ebx
push edi
push esi
call fcn.00539ed7
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00530d44
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x539f47
push ebx
push esi
push edi
call fcn.00516430
add esp, 0xc
push 0
call fcn.0053015e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x53a30b
Capabilities:
Set environment variable

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