joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4bee60
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x524cb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
lea eax, [esp + 0xc]
mov ecx, dword [esi + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
push 0
lea ecx, [esp + 0x20]
call fcn.004fefea
mov eax, dword [esi + 0xd0]
lea edx, [esp + 0x1c]
push eax
push eax
push edx
mov dword [esp + 0x44], 0
call fcn.004be7c0
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
add eax, 0x64
add esp, 0xc
add ecx, 0x64
mov dword [esp + 8], eax
lea eax, [esp + 4]
mov dword [esp + 4], ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004fef18
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
push 1
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 1]
xor edx, edx
test eax, eax
setl dl
dec edx
mov ecx, esi
and eax, edx
push eax
push 0
push 0
call fcn.004fb815
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 4
mov eax, edx
push 1
shr eax, 0x1f
lea eax, [edx + eax + 1]
test eax, eax
setl cl
dec ecx
and eax, ecx
mov ecx, esi
push eax
push 0
push 1
call fcn.004fb815
push 1
push 0
push 0
mov ecx, esi
call fcn.004fb7bd
push 1
push 0
push 1
mov ecx, esi
call fcn.004fb7bd
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.004ff05c
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x4befe0
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x524cb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0x20]
call fcn.004fefea
push 0x3e8
lea eax, [esp + 0x20]
push 0x3e8
push eax
mov dword [esp + 0x44], 0
call fcn.004be7c0
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x4c]
add ecx, 0x64
add esp, 0xc
mov dword [esp + 4], ecx
lea ecx, [esp + 4]
add eax, 0x96
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], eax
call fcn.004fef18
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 4]
cmp dword [esp + 0x44], 1
jne 0x4bf0a4
cmp dword [esp + 0x40], 1
jne 0x4bf0a2
cmp ecx, eax
jge 0x4bf0a4
mov eax, ecx
cmp eax, 0xc8
jge 0x4bf0b0
mov eax, 0xc8
mov ecx, esi
mov dword [esi + 0xd0], eax
call fcn.004bee60
mov ecx, dword [esi + 0x1c]
push 1
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.004ff05c
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret 8
Function at 0x4bf860
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x526e93
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.004f9c50
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], method.CBrush.virtual_0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.004ff292
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.005007a5
test eax, eax
je 0x4bf97c
mov ecx, dword [esp + 0x3c]
call fcn.004ff2bf
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x4bf940
push edi
mov ecx, esi
call fcn.004fc92f
mov ecx, esi
call fcn.004bfb20
cmp dword [esp + 0x38], 1
jne 0x4bf975
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.004fca6a
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x4c1aa0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x4c1ad3
push esi
call fcn.004cfdc0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x4c1acc
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x4c1b59
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x4c1b42
mov eax, dword [esi + 8]
test eax, eax
je 0x4c1af7
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x4c1b3e
cmp eax, 2
je 0x4c1b42
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4c1aea
cmp eax, 3
je 0x4c1b1d
cmp eax, 1
jne 0x4c1aea
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x4c1aea
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x4c1aea
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.004c1b80
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x4c1b68
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.004c1b80
add esp, 4
pop esi
ret

Function at 0x4c23e0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x4c2401
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x4c2401
mov eax, dword [eax + 0x44]
test eax, eax
je 0x4c2401
mov edx, dword [esp + 8]
push edx
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x4c2850
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x4c285b
xor eax, eax
ret
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, 8
not eax
jb 0x4c295e
push edi
mov edi, esi
shr edi, 3
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [edx*4 + 0x53a6b0]
sub esi, 8
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x53a6b0]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x53a6b0]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x53a6b0]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x53a6b0]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x53a6b0]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x53a6b0]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x53a6b0]
xor eax, edx
inc ecx
dec edi
jne 0x4c2876
pop edi
test esi, esi
je 0x4c2980
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x53a6b0]
xor eax, edx
inc ecx
dec esi
jne 0x4c2962
pop esi
pop ebx
not eax
ret
Function at 0x4e1c60
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0xa4]
test eax, eax
je 0x4e1ca7
mov edi, dword [esp + 0x10]
push edi
call fcn.004f83e3
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
mov dword [esi + 0xa8], eax
mov eax, dword [esi + 0xa4]
mov ecx, dword [ecx]
push eax
push edi
push 1
push ecx
call fcn.0050ea90
sub eax, edi
add esp, 0x14
neg eax
sbb eax, eax
pop edi
and eax, 0x21
pop esi
ret 0xc
mov ecx, dword [esi + 0x2c]
test ecx, ecx
je 0x4e1cdb
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4e1cdb
mov edx, dword [ecx]
call dword [edx + 0x40]
test al, al
je 0x4e1cc5
mov eax, dword [esi + 0x7c]
test eax, eax
jg 0x4e1cdb
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push eax
push ecx
mov ecx, esi
call fcn.004e1da0
pop edi
pop esi
ret 0xc
mov ecx, dword [esi + 0x18]
push ebx
mov edx, dword [ecx]
call dword [edx + 0x18]
mov ecx, dword [esi + 0x14]
mov edi, eax
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ebx, eax
cmp ebx, 0x5a
jle 0x4e1d0e
cmp edi, 0x5a
jle 0x4e1d0e
mov ecx, dword [esi + 0x2c]
mov edx, dword [ecx]
call dword [edx + 0x44]
test al, al
je 0x4e1d0e
mov ecx, dword [esi + 0x18]
mov eax, dword [ecx]
call dword [eax + 0x14]
mov eax, dword [esi + 0x7c]
imul eax, dword [esi + 0x3c]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
and edx, 0x1fff
add eax, edx
mov edi, eax
mov eax, dword [esi + 0x40]
sar edi, 0xd
cmp edi, eax
jbe 0x4e1d3d
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov al, byte [esp + 0x18]
test al, al
je 0x4e1d83
cmp ebx, 1
jge 0x4e1d83
mov ecx, dword [esi + 0x18]
mov edx, edi
shr edx, 1
cmp dword [ecx + 0xc], edx
jae 0x4e1d83
mov al, byte [esi + 0x1d]
test al, al
jne 0x4e1d83
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call ebx
mov ecx, dword [esi + 0x18]
cmp dword [ecx + 0xc], edi
jae 0x4e1d83
mov eax, dword [ecx]
call dword [eax + 0x18]
cmp eax, 0x5a
jg 0x4e1d83
mov al, byte [esi + 0x1d]
test al, al
je 0x4e1d63
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.004e1da0
pop ebx
pop edi
pop esi
ret 0xc

Function at 0x4e2f60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, ecx
mov al, byte [ebp + 0x24]
test al, al
jne 0x4e2f87
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push eax
push ecx
push 1
push edx
call fcn.0050ea90
add esp, 0x10
pop ebp
ret 0xc
push ebx
push esi
mov esi, dword [esp + 0x18]
push edi
push esi
call fcn.0050f17a
mov ebx, dword [esp + 0x18]
mov edi, eax
mov eax, dword [esp + 0x1c]
push esi
push eax
push 1
push ebx
call fcn.0050ea90
mov esi, eax
add esp, 0x14
test esi, esi
jbe 0x4e2fbb
push esi
push ebx
push edi
mov ecx, ebp
call fcn.004e3090
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x4e2fd0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x581974]
xor edx, edx
cmp eax, edx
jne 0x4e2ff6
xor eax, eax
mov byte [eax + 0x581874], al
inc eax
cmp eax, 0x100
jl 0x4e2fde
mov dword [0x581974], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x581874
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x4e3087
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x4e305a
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x4e3028
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x4e9a30
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5271fe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.004ea350
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x5407bc
call fcn.004f83e3
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x4e9ac3
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004f83e3
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x4e9abc
push 0
mov ecx, eax
call fcn.004e0c00
mov dword [esi + 0xc], eax
jmp 0x4e9ac5
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x4e9ac5
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8

Function at 0x4faa2b
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4faa63
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004f8afd
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004f8ad5
jmp 0x4faa6f
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4
Function at 0x4fc11d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4fc15f
call fcn.00501a66
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4fc15f
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4fc156
xor eax, eax
jmp 0x4fc167
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004fc16d
pop edi
pop esi
pop ebx
ret 4

Function at 0x503990
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x5039cf
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x5039cf
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x5039cf
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x5039cf
cmp dword [ecx + 0x74], 0xe
jbe 0x5039cf
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x50ef73
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.005034a0
mov eax, dword [0x56a4c0]
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.0051aa75
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x50efb5
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x50f111
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.005032e0
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 + 0x593f98]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0051d47e
mov ecx, dword [esi*4 + 0x593f98]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x50f10a
cmp eax, dword [ecx + edi + 0x24]
jne 0x50f10a
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x50f10a
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0051d47e
add esp, 0x14
test edx, edx
jl 0x50f10a
jg 0x50f080
test eax, eax
jb 0x50f10a
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x50f10a
jl 0x50f09a
cmp dword [ebp - 0x1008], eax
ja 0x50f10a
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x50f0b8
test ebx, ebx
je 0x50f0f1
cmp ecx, edi
jae 0x50f0f1
mov al, byte [ecx]
cmp al, 0xd
jne 0x50f0d2
lea eax, [edi - 1]
cmp ecx, eax
jae 0x50f0de
cmp byte [ecx + 1], 0xa
jne 0x50f0de
inc ecx
jmp 0x50f0de
movzx eax, al
movsx eax, byte [eax + 0x56ac30]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x50f0b8
cmp edx, ebx
jne 0x50f0b8
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x50f10f
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00503cd3
leave
ret

Function at 0x519e50
Capabilities:
Set environment variable

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

Function at 0x51a576
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x546310
push 0x546308
push str.FlsAlloc
push 0x1f
call fcn.0051a435
mov esi, eax
add esp, 0x10
test esi, esi
je 0x51a5aa
push dword [ebp + 8]
mov ecx, esi
call dword [0x5286ec]
call esi
jmp 0x51a5b0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x51a5f4
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x546320
push 0x546318
push str.FlsGetValue
push 0x21
call fcn.0051a435
mov esi, eax
add esp, 0x10
test esi, esi
je 0x51a62b
push dword [ebp + 8]
mov ecx, esi
call dword [0x5286ec]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x51a633
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x546328
push 0x546320
push str.FlsSetValue
push 0x22
call fcn.0051a435
mov esi, eax
add esp, 0x10
test esi, esi
je 0x51a66d
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x5286ec]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x51c3fd
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x593f98]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x51c43d
cmp byte [ebx], 0xa
jne 0x51c43d
or byte [edi + eax + 0x28], 4
jmp 0x51c442
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x51c541
mov dl, byte [eax]
cmp dl, 0x1a
je 0x51c524
inc eax
cmp dl, 0xd
je 0x51c46e
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x51c494
cmp eax, ecx
jae 0x51c4a2
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x51c456
jmp 0x51c541
push 0
lea eax, [ebp - 0x10]
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 0x51c51f
cmp dword [ebp - 0x10], 0
je 0x51c51f
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x593f98]
test byte [eax + edi + 0x28], 0x48
je 0x51c4f9
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x51c4e4
mov byte [esi], dl
jmp 0x51c4f5
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x593f98]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x51c541
cmp byte [ebp - 1], 0xa
jne 0x51c508
cmp esi, ebx
jne 0x51c508
mov byte [esi], 0xa
jmp 0x51c540
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0051d49c
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x51c541
mov byte [esi], 0xd
jmp 0x51c540
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x593f98]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x51c53e
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x51c541
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x51c54a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x593f98]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x51c590
cmp word [ebx], dx
jne 0x51c590
or byte [eax + edi + 0x28], 4
jmp 0x51c595
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x51c6f8
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x51c6d8
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x51c5d6
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x51c60c
cmp eax, edx
jae 0x51c61a
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x51c5b1
jmp 0x51c6f8
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x51c6d3
cmp dword [ebp - 0x18], 0
je 0x51c6d3
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x593f98]
test byte [eax + edi + 0x28], 0x48
je 0x51c6a9
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x51c66d
mov word [esi], cx
jmp 0x51c6a4
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x593f98]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x593f98]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x593f98]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x51c6f8
pop eax
cmp word [ebp - 4], ax
jne 0x51c6b9
cmp esi, ebx
jne 0x51c6b9
mov word [esi], ax
jmp 0x51c6f5
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0051d49c
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x51c6f8
push 0xd
pop eax
jmp 0x51c6b4
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x593f98]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x51c6f2
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x51c6f8
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret