joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47cce0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ecx, 0x5118ec
push 0
call fcn.0049f485
mov edi, eax
mov dword [ebp - 8], 1
test edi, edi
je 0x47ce75
mov eax, dword [ebp + 8]
shr eax, 4
mov dword [ebp - 0x10], eax
lea ecx, [eax + 1]
movzx eax, cx
mov dword [ebp - 0xc], eax
nop dword [eax + eax]
push 0
push eax
push 6
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov ebx, eax
test ebx, ebx
je 0x47cd7c
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x47cd7c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x47cd7c
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, dword [ebp + 8]
mov ecx, ebx
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x47cd72
cmp esi, edx
jae 0x47cd7c
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x47cd60
cmp esi, edx
jae 0x47cd7c
cmp word [esi], 0
jne 0x47cd9d
mov ecx, dword [ebp - 8]
push ecx
inc ecx
mov dword [ebp - 8], ecx
mov ecx, 0x5118ec
call fcn.0049f485
mov edi, eax
test edi, edi
je 0x47ce75
mov eax, dword [ebp - 0xc]
jmp 0x47cd20
test edi, edi
je 0x47ce75
mov eax, dword [ebp - 0x10]
inc eax
push 6
movzx eax, ax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x47ce75
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x47ce75
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x47ce75
push dword [ebp - 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and ebx, 0xf
jbe 0x47ce06
cmp esi, ecx
jae 0x47ce75
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ebx, 1
jne 0x47cdf4
cmp esi, ecx
jae 0x47ce75
movzx eax, word [esi]
test ax, ax
je 0x47ce75
mov edx, dword [ebp - 4]
mov edi, eax
mov ebx, eax
mov ecx, 1
mov edx, dword [edx]
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, edi
or ecx, eax
jge 0x47ce3c
mov ebx, dword [ebp - 4]
mov ecx, ebx
push edi
call fcn.0047c610
mov edx, dword [ebx]
movzx ebx, word [esi]
movzx ecx, bx
lea eax, [esi + 2]
push ecx
push eax
push edi
push edx
call fcn.004bb283
push eax
call int.0047cf30
mov ecx, dword [ebp - 4]
add esp, 0x14
mov eax, dword [ecx]
cmp edi, dword [eax - 8]
jg 0x47ce80
mov dword [eax - 0xc], edi
mov eax, dword [ecx]
xor ecx, ecx
mov word [eax + edi*2], cx
lea eax, [ecx + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.0047cfe0
int3
Function at 0x47efc0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7ade
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x5080f4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x3c], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x54], esi
xorps xmm0, xmm0
mov dword [ebp - 0x38], 0
movq qword [esi], xmm0
mov dword [esi + 8], 0
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0
push ecx
push eax
mov dword [ebp - 0x38], 1
movlpd qword [ebp - 0x1c], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x47f14b
cmp dword [ebp - 0x18], 0
jne 0x47f13f
mov edi, dword [ebp - 0x1c]
cmp edi, 0x7fffffff
ja 0x47f13f
mov eax, dword [esi + 4]
mov ecx, eax
mov edx, dword [esi]
sub ecx, edx
mov dword [ebp - 0x34], eax
cmp edi, ecx
jae 0x47f074
lea eax, [edx + edi]
jmp 0x47f0a5
jbe 0x47f0a8
mov eax, dword [esi + 8]
sub eax, edx
cmp edi, eax
jbe 0x47f08d
push ecx
push edi
mov ecx, esi
call fcn.0042eb80
mov edi, dword [ebp - 0x1c]
jmp 0x47f0a8
sub edi, ecx
push edi
push 0
push dword [ebp - 0x34]
call fcn.004a08b0
mov eax, dword [ebp - 0x34]
add esp, 0xc
add eax, edi
mov edi, dword [ebp - 0x1c]
mov dword [esi + 4], eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x20], 0
push eax
push edi
push dword [esi]
xorps xmm0, xmm0
push dword [ebp - 0x3c]
movups xmmword [ebp - 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x47f16d
mov eax, dword [esi + 4]
mov ecx, eax
mov edx, dword [esi]
sub ecx, edx
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x34], eax
cmp edi, ecx
jae 0x47f0f4
lea eax, [edx + edi]
mov dword [esi + 4], eax
jmp 0x47f122
jbe 0x47f122
mov eax, dword [esi + 8]
sub eax, edx
cmp edi, eax
jbe 0x47f10a
push ecx
push edi
mov ecx, esi
call fcn.0042eb80
jmp 0x47f122
sub edi, ecx
push edi
push 0
push dword [ebp - 0x34]
call fcn.004a08b0
mov ecx, dword [ebp - 0x34]
add esp, 0xc
add ecx, edi
mov dword [esi + 4], ecx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00484d55
mov esp, ebp
pop ebp
ret
push str.get_file_content
push 0xdf
jmp 0x47f157
push str.get_file_content:_GetFileSizeEx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x50]
call fcn.0043e0b0
push 0x5057bc
lea eax, [ebp - 0x50]
push eax
call fcn.004a0209
push str.get_file_content:_ReadFile
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x50]
call fcn.0043e0b0
push 0x5057bc
lea eax, [ebp - 0x50]
push eax
call fcn.004a0209
int3
Function at 0x481c00
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
push ebx
movzx eax, ax
push esi
mov esi, eax
mov dword [ebp - 4], eax
push edi
shr esi, 8
xor eax, eax
xor edi, edi
mov dword [ebp - 8], esi
cmp dword [ebp + 0x10], eax
jbe 0x481c6c
mov ecx, dword [ebp + 0xc]
movzx ebx, word [ecx + edi*2]
mov edx, ebx
movzx ecx, bl
shr edx, 8
add edx, eax
cmp esi, ecx
jb 0x481c6c
movzx ecx, bl
cmp esi, ecx
jne 0x481c64
cmp eax, edx
jge 0x481c64
mov ecx, dword [ebp + 8]
movzx esi, cl
nop dword [eax]
mov ecx, dword [ebp + 0x14]
movzx ecx, byte [eax + ecx]
cmp cx, si
je 0x481c98
inc eax
cmp eax, edx
jl 0x481c50
mov esi, dword [ebp - 8]
inc edi
mov eax, edx
cmp edi, dword [ebp + 0x10]
jb 0x481c23
mov edi, dword [ebp + 0x1c]
xor eax, eax
mov bl, 1
test edi, edi
je 0x481cb0
mov esi, dword [ebp + 0x18]
nop word [eax + eax]
movzx ecx, byte [eax + esi]
test cl, cl
jns 0x481ca1
movzx edx, byte [eax + esi + 1]
inc eax
and ecx, 0x7f
shl ecx, 8
or edx, ecx
jmp 0x481ca3
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, ecx
sub dword [ebp - 4], edx
js 0x481cb0
inc eax
xor bl, 1
cmp eax, edi
jb 0x481c80
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4905c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
xor eax, eax
movzx ecx, word [edx]
test cx, cx
je 0x4905f3
push esi
mov esi, ecx
movzx ecx, si
lea edx, [edx + 2]
add ecx, eax
imul eax, ecx, 0x401
mov ecx, eax
shr ecx, 6
xor eax, ecx
movzx ecx, word [edx]
mov esi, ecx
test cx, cx
jne 0x4905d3
pop esi
lea ecx, [eax + eax*8]
mov eax, ecx
shr eax, 0xb
xor eax, ecx
imul eax, eax, 0x8001
pop ebp
ret
Function at 0x498570
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0x10], edx
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
movzx esi, word [edx]
mov ebx, ecx
mov edi, dword [ebp + 0xc]
mov eax, esi
xor eax, 0x7f0
shr esi, 4
shr eax, 4
mov dword [ebp - 8], ebx
mov ecx, dword [edi + esi*4]
mov eax, dword [edi + eax*4]
mov dword [ebp - 4], eax
movzx eax, word [edx + 0x10]
mov esi, dword [ebp - 4]
shr eax, 4
mov dword [ebp - 0x18], ecx
mov eax, dword [edi + eax*4]
add eax, esi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4985fc
mov esi, edx
mov dword [ebp - 0xc], eax
add ebx, 4
push edi
push ebx
push ecx
push esi
call fcn.0049c230
push edi
lea eax, [ebx + 0x20]
push eax
push dword [ebp - 0x14]
lea eax, [esi + 0x10]
push eax
call fcn.0049c230
mov ecx, dword [ebp - 0x18]
add esp, 0x20
add ebx, 0x440
add esi, 0x20
sub dword [ebp - 0xc], 1
jne 0x4985c4
mov edx, dword [ebp + 8]
mov esi, dword [ebp - 4]
mov ebx, dword [ebp - 8]
mov ebx, dword [ebx]
cmp ebx, 0x10
jbe 0x4986d9
mov eax, dword [ebp - 8]
add ebx, 0xfffffff1
add eax, 0x44
shr ebx, 1
mov dword [ebp - 0x14], eax
movzx eax, word [edx + 0x10]
xor eax, 0x7f0
shr eax, 4
add esi, dword [edi + eax*4]
lea eax, [ebx + 0x180]
mov dword [ebp - 4], esi
lea eax, [edx + eax*2]
dec ebx
sub eax, 2
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], ebx
lea eax, [ebx + 0x80]
mov ebx, dword [ebp + 8]
mov edx, eax
shr eax, 1
and edx, 1
neg edx
shr edx, 4
movzx ecx, word [ebx + eax*2 + 0x200]
and edx, 0x7f
shr ecx, 4
xor ecx, edx
add esi, dword [edi + ecx*4]
cmp eax, 2
jae 0x498643
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
movzx ecx, word [eax]
mov eax, ecx
xor ecx, 0x7f0
shr eax, 4
shr ecx, 4
mov eax, dword [edi + eax*4]
add eax, esi
mov dword [edx + ebx*8], eax
mov eax, dword [edi + ecx*4]
add eax, esi
mov esi, dword [ebp - 4]
mov dword [edx + ebx*8 + 4], eax
mov eax, dword [ebp - 0xc]
test ebx, ebx
jne 0x498630
mov ecx, dword [ebp - 8]
mov eax, dword [ecx]
lea ebx, [eax*4 - 0x40]
mov eax, dword [ebp - 0x10]
cmp eax, 1
jbe 0x4986d9
lea esi, [ecx + 0x484]
lea edi, [eax - 1]
nop dword [eax]
push ebx
push edx
push esi
call fcn.004a0330
mov edx, dword [ebp - 0x14]
add esp, 0xc
add esi, 0x440
sub edi, 1
jne 0x4986c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x49a930
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
xor eax, eax
push ebx
mov ebx, dword [ebp + 8]
or ecx, 0x100
push esi
push edi
mov edi, dword [ebp + 0x10]
mov esi, ecx
shr ecx, 1
and esi, 1
neg esi
shr esi, 4
movzx edx, word [ebx + ecx*2]
and esi, 0x7f
shr edx, 4
xor edx, esi
add eax, dword [edi + edx*4]
cmp ecx, 2
jae 0x49a947
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x49a970
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, 0x100
xor ebx, ebx
push edi
mov edi, dword [ebp + 0x10]
or ecx, esi
add edi, edi
mov edx, esi
and edx, edi
mov eax, ecx
add edx, esi
shr eax, 8
add eax, edx
mov edx, dword [ebp + 8]
movzx edx, word [edx + eax*2]
mov eax, ecx
shr eax, 7
add ecx, ecx
and eax, 1
shr edx, 4
neg eax
shr eax, 4
and eax, 0x7f
xor edx, eax
mov eax, dword [ebp + 0x14]
add ebx, dword [eax + edx*4]
mov edx, ecx
xor edx, edi
not edx
and esi, edx
cmp ecx, 0x10000
jb 0x49a985
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret
Function at 0x49bce0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
movaps xmm0, xmmword [0x4dde10]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, 0x400
push edi
mov edi, 0xc
mov eax, dword [esi + 0x78]
lea edx, [esi + 0x1e54]
mov dword [esi + 0x70], eax
lea eax, [esi + 0x201c]
mov dword [esi + 0x2c], 0
mov dword [esi + 0x44], 1
mov dword [esi + 0x40], 1
mov dword [esi + 0x3c], 1
mov dword [esi + 0x38], 1
mov dword [esi + 0x58], 0xffffffff
mov dword [esi + 0x5c], 0
mov dword [esi + 0x60], 0
mov dword [esi + 0x64], 0
mov dword [esi + 0x68], 0
mov dword [esi + 0x6c], 0
mov dword [esi + 0x80], 0
mov dword [esi + 0x84], 0
mov dword [esi + 0x88], 0
movups xmmword [esi + 0x1e1c], xmm0
movups xmmword [esi + 0x1e2c], xmm0
nop word [eax + eax]
mov ecx, 0x10
nop word [eax + eax]
mov word [eax - 0x180], bx
mov word [eax], bx
add eax, 2
sub ecx, 1
jne 0x49bda0
mov word [edx - 0x18], bx
mov word [edx], bx
mov word [edx + 0x18], bx
mov word [edx + 0x30], bx
add edx, 2
sub edi, 1
jne 0x49bd90
mov eax, 0x4000400
lea edi, [esi + 0x219c]
mov ecx, 0x80
rep stosd dword es:[edi], eax
lea edi, [esi + 0x239c]
mov ecx, 0x40
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x98]
mov eax, 0x300
add ecx, dword [esi + 0x94]
shl eax, cl
test eax, eax
je 0x49be12
mov edi, dword [esi + 0x50]
mov ecx, eax
shr ecx, 1
mov eax, 0x4000400
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, 0x4000400
lea edi, [esi + 0x249c]
mov ecx, 0x80
rep stosd dword es:[edi], eax
lea edi, [esi + 0x269c]
mov ecx, 0x80
rep stosd dword es:[edi], eax
mov ecx, 0x80
lea edi, [esi + 0x289c]
rep stosd dword es:[edi], eax
lea edi, [esi + 0x2a9c]
mov ecx, 0x80
rep stosd dword es:[edi], eax
mov dword [esi + 0x1c], 0
lea eax, [esi + 0xbca4]
mov dword [esi + 0x18], 0
mov ecx, 0x800
mov dword [eax], 0x40000000
lea eax, [eax + 0x20]
sub ecx, 1
jne 0x49be64
mov dword [esi + 0x34], ecx
mov eax, 1
mov ecx, dword [esi + 0x9c]
mov edx, 0x100
shl eax, cl
mov ecx, dword [esi + 0x98]
dec eax
mov dword [esi + 0x4c], eax
mov eax, edx
shl eax, cl
mov ecx, dword [esi + 0x94]
shr edx, cl
sub eax, edx
pop edi
mov dword [esi + 0x48], eax
pop esi
pop ebx
pop ebp
ret

Function at 0x49c230
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor ebx, ebx
mov edx, dword [ebp + 8]
mov edi, ebx
shr edi, 1
mov esi, ebx
shr esi, 2
mov eax, edi
and eax, 1
neg eax
shr eax, 4
movzx ecx, word [edx + esi*2 + 4]
and eax, 0x7f
shr ecx, 4
neg esi
xor ecx, eax
and esi, 0x7f0
movzx eax, word [edx + 2]
xor esi, eax
mov eax, dword [ebp + 0x14]
shr esi, 4
mov edx, dword [eax + ecx*4]
add edx, dword [eax + esi*4]
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
add edx, dword [ebp + 0xc]
movzx ecx, word [eax + edi*2 + 8]
mov edi, dword [ebp + 0x10]
mov eax, ecx
shr eax, 4
xor ecx, 0x7f0
shr ecx, 4
mov eax, dword [esi + eax*4]
add eax, edx
mov dword [edi + ebx*4], eax
mov eax, dword [esi + ecx*4]
add eax, edx
mov dword [edi + ebx*4 + 4], eax
add ebx, 2
cmp ebx, 8
jb 0x49c238
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x49d2d0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push esi
mov dword [eax + 0x34], 0
lea esi, [eax + 0x60]
mov word [eax + 0x1e], 0
mov dword [eax + 0x24], 0
mov dword [eax + 0x468], 0xffffffff
mov dword [eax + 0x46c], 0xffffffff
mov dword [eax + 0x30], 0x20
mov byte [eax + 0x1d], 1
mov dword [eax + 0x48], 4
mov ecx, edx
lea esi, [esi + 4]
and ecx, 1
mov eax, edx
shr eax, 1
neg ecx
and ecx, 0xedb88320
inc edx
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xedb88320
xor eax, ecx
mov dword [esi - 4], eax
cmp edx, 0x100
jb 0x49d316
pop esi
pop ebp
ret

Function at 0x49f110
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 0
push 0
call fcn.004af7ac
mov ecx, dword [ebp + 8]
add esp, 0x18
mov dword [ecx], eax
test eax, eax
je 0x49f13b
xor eax, eax
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 1
cmovne ecx, eax
mov eax, ecx
mov esp, ebp
pop ebp
ret
Function at 0x4c0b34
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4e17dc
push 0x4e17d4
push str.FlsAlloc
push 0x1e
call fcn.004c0961
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4c0b68
push dword [ebp + 8]
mov ecx, esi
call dword [0x4d9444]
call esi
jmp 0x4c0b6e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4c0bb2
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4e17ec
push 0x4e17e4
push str.FlsGetValue
push 0x20
call fcn.004c0961
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4c0be9
push dword [ebp + 8]
mov ecx, esi
call dword [0x4d9444]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4c4584
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x5080f4]
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 0x4c45cf
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.004c4723
test al, al
jne 0x4c45c9
sub edx, 2
cmp edx, edi
jne 0x4c45af
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x4c45f1
lea eax, [edi + 2]
cmp edx, eax
je 0x4c45f1
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004c44d0
add esp, 0x10
jmp 0x4c46eb
push esi
lea ecx, [ebp - 0x255]
call fcn.004c4723
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 0x4c4634
push dword [ebp - 0x25c]
jmp 0x4c45e1
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 0x4c4671
cmp word [ebp - 0x226], 0
je 0x4c4692
cmp word [ebp - 0x226], ax
jne 0x4c4671
cmp word [ebp - 0x224], 0
je 0x4c4692
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.004c44d0
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4c46de
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x4c464b
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x4c46c6
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4c46eb
push 0x4c4300
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004cc000
add esp, 0x10
jmp 0x4c46bb
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.00484d55
leave
ret
Function at 0x4c5062
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4c5073
pop esi
ret
push ebx
push edi
push esi
call fcn.004c502b
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004be354
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4c509b
push ebx
push esi
push edi
call fcn.004a0330
add esp, 0xc
push 0
call fcn.004be31a
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x4c545f
Capabilities:
Set environment variable

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

Function at 0x4c7803
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 + 0x511dd0]
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 0x4c7843
cmp byte [ebx], 0xa
jne 0x4c7843
or byte [eax + edi + 0x28], 4
jmp 0x4c7848
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4c7946
mov al, byte [edx]
cmp al, 0x1a
je 0x4c7928
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4c7877
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4c789c
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4c78a6
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 0x4c7859
jmp 0x4c7946
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 0x4c7923
cmp dword [ebp - 0xc], 0
je 0x4c7923
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x511dd0]
test byte [eax + edi + 0x28], 0x48
je 0x4c78fd
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4c78e8
mov byte [esi], dl
jmp 0x4c78f9
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x511dd0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4c7946
cmp byte [ebp - 1], 0xa
jne 0x4c790c
cmp esi, ebx
jne 0x4c790c
mov byte [esi], 0xa
jmp 0x4c7945
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004c8251
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4c7946
mov byte [esi], 0xd
jmp 0x4c7945
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x511dd0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4c7942
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4c7946
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4c794f
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 + 0x511dd0]
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 0x4c7992
cmp word [esi], dx
jne 0x4c7992
or byte [edi + eax + 0x28], 4
jmp 0x4c7997
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 0x4c7aea
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 0x4c7aca
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4c79d9
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4c7a0f
cmp eax, edx
jae 0x4c7a1b
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 0x4c79b1
jmp 0x4c7aea
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 0x4c7ac6
cmp dword [ebp - 0x14], 0
je 0x4c7ac6
mov eax, dword [ebx*4 + 0x511dd0]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4c7a9e
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4c7a67
mov word [esi], cx
jmp 0x4c7a9a
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x511dd0]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x511dd0]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x511dd0]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4c7aea
pop ebx
cmp word [ebp - 4], bx
jne 0x4c7aaf
cmp esi, dword [ebp + 0xc]
jne 0x4c7aaf
mov word [esi], bx
jmp 0x4c7ae7
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004c8251
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4c7aea
push 0xd
jmp 0x4c7ae3
mov ecx, dword [ebx*4 + 0x511dd0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4c7ae1
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4c7aea
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