joyce8/EMBER2024-capa huggingface dataset:
Function at 0x52d9d0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
mov eax, dword [esp + 0x64]
push ebx
mov ebx, dword [eax + 0x20]
test ebx, ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x64]
mov ebp, dword [edi]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
je 0x52dba8
lea esp, [esp]
movzx edx, byte [ebx + 8]
mov ecx, dword [esp + 0x68]
cmp edx, ecx
jne 0x52db9d
movzx eax, byte [ebx + 9]
cmp eax, dword [esp + 0x70]
jne 0x52db9d
mov eax, dword [ebx + 0x1c]
cmp eax, dword [ebx + 0x20]
je 0x52da32
mov edx, dword [ebp + 8]
cmp eax, dword [edx + 0x2c]
jne 0x52db9d
cmp ecx, 0x64
jne 0x52da53
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x52da53
mov esi, dword [esp + 0x6c]
push eax
call fcn.0052d690
add esp, 4
test eax, eax
je 0x52db9d
mov eax, dword [edi + 0x188]
test eax, eax
je 0x52da70
lea ecx, [ecx]
cmp ebx, dword [eax + 0x1c]
je 0x52db9d
mov eax, dword [eax + 0x20]
test eax, eax
jne 0x52da60
mov eax, dword [ebx]
push 0xffffffffffffffff
push eax
push str.___TRIGGER__s
push ebp
call fcn.0050d8d0
mov ecx, dword [edi + 0xc]
add esp, 0xc
push eax
push 0
push 0
push 0
push 0x14
push ecx
call fcn.005104e0
mov edx, dword [esp + 0x94]
mov ecx, dword [esp + 0x90]
xor eax, eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x38], edx
mov edx, dword [edi + 0x188]
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x34]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], edx
mov dword [edi + 0x188], ecx
mov edx, dword [ebx]
push edx
lea eax, [esp + 0x30]
push eax
push edi
mov dword [esp + 0x64], edi
call fcn.0052fae0
mov ecx, dword [edi + 0xc]
push ecx
call fcn.0050e150
mov edx, dword [ebx + 0xc]
push edx
push ebp
mov dword [esp + 0x98], eax
call fcn.00536860
add esp, 0x34
cmp byte [ebp + 0x1e], 0
mov esi, eax
jne 0x52dbd4
lea eax, [esp + 0x3c]
push esi
push eax
call fcn.005373b0
add esp, 8
test eax, eax
jne 0x52dbd4
mov ecx, dword [esp + 0x64]
push 8
push ecx
push esi
push edi
call fcn.00538930
push esi
call fcn.00535e00
mov edx, dword [esp + 0x94]
mov eax, dword [ebx + 0x24]
push edx
push eax
call fcn.0052d7d0
mov ecx, dword [esp + 0x54]
lea edx, [esp + 0x2c]
push edx
mov dword [edi + 0x188], ecx
call fcn.0052fb10
mov eax, dword [esp + 0x84]
mov ecx, dword [edi + 0xc]
push eax
push ecx
call fcn.0050e1a0
add esp, 0x28
mov ebx, dword [ebx + 0x28]
test ebx, ebx
jne 0x52da00
mov eax, dword [esp + 0x88]
test eax, eax
je 0x52dbb9
mov ecx, dword [esp + 0x28]
or dword [eax], ecx
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x52dbca
mov edx, dword [esp + 0x24]
or dword [eax], edx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x50
ret
mov edx, dword [esp + 0x38]
push esi
mov dword [edi + 0x188], edx
call fcn.00535e00
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x50
ret
Function at 0x535fd0
Capabilities:
Enumerate pe sections

Disassembly:
push edi
mov edi, dword [esp + 0xc]
test edi, edi
jne 0x535fdd
xor eax, eax
pop edi
ret
push ebp
mov ebp, dword [esp + 0xc]
push esi
push 0x48
push ebp
call fcn.00511720
mov esi, eax
add esp, 8
test esi, esi
jne 0x535ff8
pop esi
pop ebp
pop edi
ret
mov al, byte [edi + 5]
mov byte [esi + 5], al
mov ecx, dword [edi]
push ecx
push ebp
call fcn.00534ef0
mov dword [esi], eax
mov edx, dword [edi + 0xc]
push edx
push ebp
call fcn.00535ea0
mov dword [esi + 0xc], eax
mov eax, dword [edi + 0x10]
push eax
push ebp
call fcn.00536860
mov dword [esi + 0x10], eax
mov ecx, dword [edi + 0x14]
push ecx
push ebp
call fcn.00534ef0
mov dword [esi + 0x14], eax
mov edx, dword [edi + 0x18]
push edx
push ebp
call fcn.00536860
mov dword [esi + 0x18], eax
mov eax, dword [edi + 0x1c]
push eax
push ebp
call fcn.00534ef0
mov dword [esi + 0x1c], eax
movzx ecx, byte [edi + 4]
mov byte [esi + 4], cl
mov edx, dword [edi + 0x20]
push edx
push ebp
call fcn.00535fd0
mov dword [esi + 0x20], eax
mov eax, dword [edi + 0x2c]
push eax
push ebp
call fcn.00536860
mov dword [esi + 0x2c], eax
mov ecx, dword [edi + 0x30]
add esp, 0x40
push ecx
push ebp
call fcn.00536860
mov dword [esi + 0x30], eax
or eax, 0xffffffff
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
mov dl, byte [edi + 6]
mov byte [esi + 6], dl
movzx ecx, byte [edi + 7]
add esp, 8
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], eax
mov byte [esi + 7], cl
mov byte [esi + 8], 0
mov byte [esi + 9], 0
mov dword [esi + 0x28], 0
mov eax, esi
pop esi
pop ebp
pop edi
ret
Function at 0x40d380
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push esi
push edi
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
push edi
push esi
push edi
push esi
mov ebx, esp
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
push eax
push ebx
cmp ecx, 0
je 0x40d46a
and ebp, 0xfffffff8
mov eax, dword [esp + 8]
mov ebx, dword [esp + 0xc]
je 0x40d3fd
mov ecx, dword [esi]
mov edx, dword [esi + 4]
xor eax, ecx
xor ebx, edx
bswap eax
bswap ebx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ebx
call fcn.0040cb40
mov eax, dword [esp + 8]
mov ebx, dword [esp + 0xc]
bswap eax
bswap ebx
mov dword [edi], eax
mov dword [edi + 4], ebx
add esi, 8
add edi, 8
sub ebp, 8
jne 0x40d3c3
mov ebp, dword [esp + 0x34]
and ebp, 7
je 0x40d533
call fcn.0040d40f
and ebp, 0xfffffff8
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
je 0x40d4ca
mov eax, dword [esi]
mov ebx, dword [esi + 4]
bswap eax
bswap ebx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ebx
call fcn.0040cf60
mov eax, dword [esp + 8]
mov ebx, dword [esp + 0xc]
bswap eax
bswap ebx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
xor ecx, eax
xor edx, ebx
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov dword [edi], ecx
mov dword [edi + 4], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
add esi, 8
add edi, 8
sub ebp, 8
jne 0x40d47b
mov ebp, dword [esp + 0x34]
and ebp, 7
je 0x40d533
mov eax, dword [esi]
mov ebx, dword [esi + 4]
bswap eax
bswap ebx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ebx
call fcn.0040cf60
mov eax, dword [esp + 8]
mov ebx, dword [esp + 0xc]
bswap eax
bswap ebx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
xor ecx, eax
xor edx, ebx
mov eax, dword [esi]
mov ebx, dword [esi + 4]
ror edx, 0x10
mov byte [edi + 6], dl
shr edx, 0x10
mov byte [edi + 5], dh
mov byte [edi + 4], dl
mov dword [edi], ecx
jmp 0x40d52e
jmp 0x40d533
mov ecx, dword [esp + 0x3c]
add esp, 0x18
mov dword [ecx], eax
mov dword [ecx + 4], ebx
pop edi
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
push ebx
push esi
push edi
sub esp, 0x10
mov ebp, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
bswap eax
bswap ebx
bswap ecx
bswap edx
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
cmp ebp, 0x80
je 0x40dea4
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0x14]
cmp ebp, 0xc0
je 0x40de7c
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
jmp 0x40de84
mov ecx, eax
mov edx, ebx
not ecx
not edx
bswap eax
bswap ebx
bswap ecx
bswap edx
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], ebx
mov dword [edi + 0x28], ecx
mov dword [edi + 0x2c], edx
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
nop
call fcn.0040dea9
Function at 0x45a4c0
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
mov eax, 4
call fcn.0051aba0
push edi
mov edi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 4], eax
test edi, edi
je 0x45a540
mov cl, byte [edi]
test cl, cl
je 0x45a540
push ebx
push esi
mov ebx, 0x100
nop word [eax + eax]
movd xmm1, dword [esp + 0xc]
lea edi, [edi + 1]
movsx esi, cl
mov edx, 0x20
or esi, ebx
add ebx, 0x100
mov ecx, esi
shr ecx, 2
xor ecx, esi
imul esi, esi
and ecx, 0xf
sub edx, ecx
shl eax, cl
mov cl, byte [edi]
movd xmm0, edx
psrlq xmm1, xmm0
movd edx, xmm1
or eax, edx
xor eax, esi
mov dword [esp + 0xc], eax
test cl, cl
jne 0x45a4f0
mov ecx, eax
pop esi
shr ecx, 0x10
pop ebx
xor eax, ecx
pop edi
pop ecx
ret
xor eax, eax
pop edi
pop ecx
ret

Function at 0x45a650
Capabilities:
Encode data using xor

Disassembly:
mov eax, 4
call fcn.0051aba0
push ebx
mov ebx, dword [esp + 0xc]
push esi
xor esi, esi
mov dword [esp + 8], esi
test ebx, ebx
je 0x45a6d5
mov al, byte [ebx]
test al, al
je 0x45a6d5
push ebp
push edi
mov ebp, 0x100
movsx eax, al
push eax
call fcn.00457c00
movd xmm1, dword [esp + 0x14]
lea ebx, [ebx + 1]
mov edi, eax
mov edx, 0x20
or edi, ebp
add esp, 4
mov ecx, edi
add ebp, 0x100
shr ecx, 2
xor ecx, edi
imul edi, edi
and ecx, 0xf
sub edx, ecx
shl esi, cl
movd xmm0, edx
psrlq xmm1, xmm0
movd eax, xmm1
or eax, esi
xor eax, edi
mov esi, eax
mov al, byte [ebx]
mov dword [esp + 0x10], esi
test al, al
jne 0x45a677
mov eax, esi
pop edi
shr eax, 0x10
pop ebp
xor eax, esi
pop esi
pop ebx
pop ecx
ret
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x45db80
Capabilities:
Generate random numbers via winapi

Disassembly:
mov eax, 4
call fcn.0051aba0
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
push 1
push esi
xor edi, edi
call fcn.00450860
mov ebx, eax
push ebx
push esi
call fcn.00450740
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x45dc09
push 0xf0000040
push 1
push edi
push edi
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x45dbe3
push ebp
push ebx
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [esp + 0x14]
test eax, eax
cmovne edi, ebx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea eax, [edi*8]
push eax
push edi
push esi
call fcn.004507b0
push esi
call fcn.00450900
mov edi, eax
add esp, 0x10
test edi, edi
je 0x45dc09
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 1
push esi
call fcn.00450860
mov ebx, eax
push ebx
push esi
call fcn.00450740
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x45dc78
push 0xf0000040
push 0x16
push str.Intel_Hardware_Cryptographic_Service_Provider
xor edi, edi
lea eax, [esp + 0x1c]
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x45dc5e
push ebp
push ebx
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [esp + 0x14]
test eax, eax
cmovne edi, ebx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea eax, [edi*8]
push eax
push edi
push esi
call fcn.004507b0
push esi
call fcn.00450900
add esp, 0x10
mov edi, eax
test edi, edi
jne 0x45dc01
push esi
call fcn.00450900
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x4af0b0
Capabilities:
Encode data using xor

Disassembly:
cmp dword [esp + 0x18], 0
je 0x4af0c4
mov dword [esp + 0x18], fcn.004ad880
jmp fcn.00452400
mov dword [esp + 0x18], fcn.004acb20
jmp fcn.00452130
Function at 0x50b3c8
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0051aba0
mov eax, dword [0x576004]
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.0050a9da
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x50b40a
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x50b566
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0051b090
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 + 0x57aba0]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00513cdc
mov ecx, dword [esi*4 + 0x57aba0]
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 0x50b55f
cmp eax, dword [edi + ecx + 0x24]
jne 0x50b55f
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 0x50b55f
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00513cdc
add esp, 0x14
test edx, edx
jl 0x50b55f
jg 0x50b4d5
test eax, eax
jb 0x50b55f
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x50b55f
jl 0x50b4ef
cmp dword [ebp - 0x1008], eax
ja 0x50b55f
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x50b50d
test ebx, ebx
je 0x50b546
cmp ecx, edi
jae 0x50b546
mov al, byte [ecx]
cmp al, 0xd
jne 0x50b527
lea eax, [edi - 1]
cmp ecx, eax
jae 0x50b533
cmp byte [ecx + 1], 0xa
jne 0x50b533
inc ecx
jmp 0x50b533
movzx eax, al
movsx eax, byte [eax + 0x5775a0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x50b50d
cmp edx, ebx
jne 0x50b50d
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x50b564
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00448c00
leave
ret
Function at 0x50befe
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x576004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x56f9c8
push esi
call fcn.00511cea
pop ecx
pop ecx
test eax, eax
jne 0x50bf2c
xor al, al
jmp 0x50bfa9
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.0050bc41
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x50bf66
push dword [ebp - 0x210]
call fcn.004fe8ad
xor al, al
jmp 0x50bfa7
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x50bf6c
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x50bf8c
push edx
call fcn.0050be34
pop ecx
test al, al
je 0x50bf57
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x50bf9a
mov bl, 1
push dword [ebp - 0x210]
call fcn.004fe8ad
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00448c00
leave
ret

Function at 0x50d472
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x570be8
push 0x570be0
push str.FlsAlloc
push 0x1e
call fcn.0050d333
mov esi, eax
add esp, 0x10
test esi, esi
je 0x50d4a6
push dword [ebp + 8]
mov ecx, esi
call dword [0x51c1f0]
call esi
jmp 0x50d4ac
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x50d4f0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x570bf8
push 0x570bf0
push str.FlsGetValue
push 0x20
call fcn.0050d333
mov esi, eax
add esp, 0x10
test esi, esi
je 0x50d527
push dword [ebp + 8]
mov ecx, esi
call dword [0x51c1f0]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x510d0a
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x510da7
push ebx
push esi
call fcn.00510cd3
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00510c1c
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x510d54
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x510da6
push edi
push eax
call fcn.0050d155
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x510d74
call fcn.0050d11b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x510da5
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00510c1c
add esp, 0x20
test eax, eax
jne 0x510d93
push edi
call fcn.0050d11b
jmp 0x510d9b
push ebx
call fcn.0050d11b
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x510daa
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x510dbb
pop esi
ret
push ebx
push edi
push esi
call fcn.00510cd3
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0050d155
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x510de3
push ebx
push esi
push edi
call fcn.004fb3f0
add esp, 0xc
push 0
call fcn.0050d11b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x51152f
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00511056
Function at 0x512ffa
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 + 0x57aba0]
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 0x51303a
cmp byte [ebx], 0xa
jne 0x51303a
or byte [eax + edi + 0x28], 4
jmp 0x51303f
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x51313d
mov al, byte [edx]
cmp al, 0x1a
je 0x51311f
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x51306e
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x513093
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x51309d
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 0x513050
jmp 0x51313d
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 0x51311a
cmp dword [ebp - 0xc], 0
je 0x51311a
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x57aba0]
test byte [eax + edi + 0x28], 0x48
je 0x5130f4
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x5130df
mov byte [esi], dl
jmp 0x5130f0
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x57aba0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x51313d
cmp byte [ebp - 1], 0xa
jne 0x513103
cmp esi, ebx
jne 0x513103
mov byte [esi], 0xa
jmp 0x51313c
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00513cfa
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x51313d
mov byte [esi], 0xd
jmp 0x51313c
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x57aba0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x513139
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x51313d
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x513146
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 + 0x57aba0]
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 0x513189
cmp word [esi], dx
jne 0x513189
or byte [edi + eax + 0x28], 4
jmp 0x51318e
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 0x5132c7
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 0x5132a7
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x5131d0
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x513206
cmp eax, edx
jae 0x513212
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 0x5131a8
jmp 0x5132c7
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 0x5132a3
cmp dword [ebp - 0x14], 0
je 0x5132a3
mov eax, dword [ebx*4 + 0x57aba0]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x51327b
mov cx, word [ebp - 4]
pop eax
cmp cx, ax
je 0x5132c1
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x57aba0]
push 0xa
mov byte [edi + eax + 0x2a], cl
mov eax, dword [ebx*4 + 0x57aba0]
shr cx, 8
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x57aba0]
pop ecx
mov byte [edi + eax + 0x2c], cl
jmp 0x5132c4
pop ebx
cmp word [ebp - 4], bx
jne 0x51328c
cmp esi, dword [ebp + 0xc]
jne 0x51328c
mov word [esi], bx
jmp 0x5132c4
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00513cfa
add esp, 0x10
cmp word [ebp - 4], bx
je 0x5132c7
push 0xd
jmp 0x5132c0
mov ecx, dword [ebx*4 + 0x57aba0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5132be
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5132c7
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