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

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0xc34d22c
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0xc34d1d3
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0xc34d1e2
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0xc752e85
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0xc34d233
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.0c3340a9
cmp eax, dword [ebp + 0xc]
pop eax
je 0xc34d2d2
add edi, 4
add eax, 2
dec ecx
jne 0xc34d218
call 0xc34d27f
loope 0xc34d275
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0xc34d2cf
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0xc34d2e0
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0xc34d293
cmp eax, ecx
ja 0xc34d293
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0xc34d31d
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0xc34d313
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.0c334588
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0xc34d1e2
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0xc34d22c
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0xc34d1d3
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0xc34d1e2
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0xc752e85
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0xc34d233
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.0c3340a9
cmp eax, dword [ebp + 0xc]
pop eax
je 0xc34d2d2
add edi, 4
add eax, 2
dec ecx
jne 0xc34d218
call 0xc34d27f
loope 0xc34d275
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0xc34d2cf
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0xc34d2e0
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0xc34d293
cmp eax, ecx
ja 0xc34d293
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0xc34d31d
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0xc34d313
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.0c334588
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x40abc0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x42f008]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x208
push 0
lea eax, [ebp - 0x20c]
push eax
call fcn.004133f0
add esp, 0xc
mov dword [ebp - 0x220], 0x27ac
mov dword [ebp - 0x214], 0x14347
mov dword [ebp - 0x224], 0x15e68
mov dword [ebp - 0x21c], 0xa8a0
mov dword [ebp - 0x218], 0x15748
lea ecx, [ebp - 0x20c]
push ecx
push 0
push 0
push 0xe
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x40ac79
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00411d0f
mov esp, ebp
pop ebp
ret
Function at 0x412582
Capabilities:
Parse pe header

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

Function at 0x41ccc4
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x427dcc
push 0x427dc4
push str.FlsAlloc
push 0x1f
call fcn.0041cbff
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41ccf8
push dword [ebp + 8]
mov ecx, esi
call dword [0x426244]
call esi
jmp 0x41ccfe
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x41cd42
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x427ddc
push 0x427dd4
push str.FlsGetValue
push 0x21
call fcn.0041cbff
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41cd79
push dword [ebp + 8]
mov ecx, esi
call dword [0x426244]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x41cd81
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x427de4
push 0x427ddc
push str.FlsSetValue
push 0x22
call fcn.0041cbff
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41cdbb
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x426244]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x41d7b2
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x42f008]
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 0x41d7fd
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0041d9cf
test al, al
jne 0x41d7f7
sub edx, 2
cmp edx, edi
jne 0x41d7dd
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x41d81f
lea eax, [edi + 2]
cmp edx, eax
je 0x41d81f
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0041d6fe
add esp, 0x10
jmp 0x41d919
push esi
lea ecx, [ebp - 0x255]
call fcn.0041d9cf
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 0x41d862
push dword [ebp - 0x25c]
jmp 0x41d80f
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 0x41d89f
cmp word [ebp - 0x226], 0
je 0x41d8c0
cmp word [ebp - 0x226], ax
jne 0x41d89f
cmp word [ebp - 0x224], 0
je 0x41d8c0
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0041d6fe
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x41d90c
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x41d879
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x41d8f4
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x41d919
push 0x41d52e
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004226f0
add esp, 0x10
jmp 0x41d8e9
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.00411d0f
leave
ret
Function at 0x425580
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4255ad
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4255ad
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x40605d
Capabilities:
Hash data using sha256

Disassembly:
cmp dword [0x44a200], 2
jl 0x406082
movaps xmm0, xmmword [0x4347f0]
movaps xmmword [0x441040], xmm0
movaps xmm0, xmmword [0x4347e0]
movaps xmmword [0x441050], xmm0
push esi
mov esi, dword [esp + 8]
mov ecx, esi
call fcn.0040640a
xor edx, edx
mov ecx, dword [esi + 0xf4]
mov eax, dword [edx + 0x4347b8]
mov dword [edx + ecx], eax
add edx, 4
cmp edx, 0x20
jl 0x406090
mov eax, dword [esi + 0xf4]
xor dword [eax], 0x2080020
mov ecx, dword [esi + 0xf4]
mov eax, dword [esp + 0xc]
xor dword [ecx + 8], eax
mov ecx, dword [esi + 0xf4]
mov eax, dword [esp + 0x10]
or eax, 0x2000
shl eax, 0x10
xor dword [ecx + 0xc], eax
pop esi
ret 0xc

Function at 0x406773
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
test esi, esi
je 0x40679d
movzx ecx, byte [edi]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x441060]
inc edi
sub esi, 1
jne 0x406785
pop edi
mov eax, edx
pop esi
ret 0xc

Function at 0x40698a
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebp
push esi
push edi
mov edi, dword [esp + 0x34]
xor ebp, ebp
cmp dword [edi], 2
lea esi, [edi + 4]
jne 0x4069e0
mov eax, dword [esi]
push ebx
push ebp
push ebp
push ebp
push ebp
mov dword [esp + 0x20], eax
lea eax, [esp + 0x24]
push eax
push 4
lea eax, [esp + 0x28]
push eax
push 0x20
push dword [esp + 0x5c]
call fcn.00407074
mov edx, ebp
mov ebx, ebp
movzx eax, byte [esp + edx + 0x14]
mov ecx, edx
and ecx, 3
shl ecx, 3
shl eax, cl
xor eax, ebx
inc edx
mov ebx, eax
cmp edx, 0x20
jb 0x4069c4
mov dword [esi], eax
pop ebx
cmp dword [edi], 3
jne 0x406a0c
push ebp
push ebp
push ebp
push ebp
lea eax, [esp + 0x20]
push eax
push 0x20
push esi
push 0x20
push dword [esp + 0x58]
call fcn.00407074
push 0x20
lea eax, [esp + 0x14]
push eax
push esi
call fcn.00422a30
add esp, 0xc
pop edi
pop esi
pop ebp
add esp, 0x24
ret 8
Function at 0x406dcf
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x864
push ebp
mov ebp, dword [esp + 0x880]
mov eax, ecx
mov dword [esp + 4], eax
cmp ebp, 0x18
ja 0x406fad
push ebx
push esi
xor ebx, ebx
lea esi, [eax + 0xf4]
push edi
mov edi, ebx
push dword [esp + 0x87c]
mov ecx, esi
call fcn.00410340
test al, al
je 0x406e2d
lea eax, [esi + 0x10]
cmp dword [eax + 0x30], ebp
jne 0x406e2d
push 0x10
push dword [esp + 0x888]
push eax
call fcn.004213b2
add esp, 0xc
test eax, eax
je 0x406fb7
inc edi
add esi, 0x84
cmp edi, 4
jb 0x406df9
mov esi, 0x800
lea eax, [esp + 0x74]
push esi
push eax
push dword [esp + 0x888]
call fcn.00412f40
xor eax, eax
mov ecx, ebp
inc eax
shl eax, cl
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x20]
push eax
push 0x10
push dword [esp + 0x898]
lea eax, [esp + 0x8c]
push eax
call fcn.00426fc0
pop ecx
push eax
lea eax, [esp + 0x90]
push eax
call fcn.0040727f
push esi
lea eax, [esp + 0x78]
push eax
call fcn.00410564
mov edx, dword [esp + 0x10]
push dword [esp + 0x87c]
mov ecx, dword [edx + 0x304]
lea edi, [edx + 0xf4]
mov eax, ecx
and eax, 3
imul eax, eax, 0x84
add edi, eax
lea eax, [ecx + 1]
mov dword [edx + 0x304], eax
mov ecx, edi
mov dword [edi + 0x40], ebp
call fcn.00406960
push 0x10
push dword [esp + 0x888]
lea eax, [edi + 0x10]
push eax
call fcn.00422a30
push 0x20
pop ebp
push ebp
lea eax, [esp + 0x24]
push eax
lea esi, [edi + 0x20]
push esi
call fcn.00422a30
push ebp
lea eax, [esp + 0x50]
push eax
lea eax, [edi + 0x44]
push eax
call fcn.00422a30
push ebp
lea eax, [esp + 0x7c]
push eax
lea eax, [edi + 0x64]
push eax
call fcn.00422a30
add esp, 0x30
push ebx
push 1
push ebp
push esi
call fcn.00410475
cmp dword [esp + 0x890], ebx
je 0x406f3b
push ebp
lea eax, [esp + 0x58]
push eax
push dword [esp + 0x898]
call fcn.00422a30
add esp, 0xc
mov esi, dword [esp + 0x894]
test esi, esi
je 0x406f6e
push 8
push ebx
push esi
call fcn.00420e20
add esp, 0xc
mov al, byte [esp + ebx + 0x34]
mov ecx, ebx
and ecx, 7
xor byte [ecx + esi], al
inc ebx
cmp ebx, ebp
jb 0x406f52
push ebp
lea eax, [esp + 0x38]
push eax
call fcn.00410564
cmp dword [esp + 0x888], 0
pop edi
pop esi
pop ebx
je 0x406fa2
push dword [esp + 0x87c]
mov ecx, dword [esp + 8]
lea eax, [esp + 0xc]
push 0x100
push eax
push dword [esp + 0x878]
add ecx, 0x30c
call fcn.0040f990
push ebp
lea eax, [esp + 0xc]
push eax
call fcn.00410564
pop ebp
add esp, 0x864
ret 0x20
push 0x20
pop ebp
push ebp
lea eax, [esi + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00422a30
add esp, 0xc
lea eax, [esp + 0x14]
push ebx
push ebx
push ebp
push eax
call fcn.00410475
push ebp
lea eax, [esi + 0x44]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.00422a30
push ebp
lea eax, [esi + 0x64]
push eax
lea eax, [esp + 0x68]
push eax
call fcn.00422a30
add esp, 0x18
jmp 0x406f1d
Function at 0x407074
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0x1bc
push ebx
mov ebx, dword [esp + 0x1c8]
push ebp
push esi
push edi
push 0x40
pop edi
cmp ebx, edi
jbe 0x4070c9
lea eax, [esp + 0x164]
push eax
call fcn.00411135
push ebx
push dword [esp + 0x1d4]
lea eax, [esp + 0x16c]
push eax
call fcn.0041117b
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x168]
push eax
call fcn.00411052
push 0x20
lea eax, [esp + 0x58]
pop ebx
jmp 0x4070d0
mov eax, dword [esp + 0x1d0]
mov ebp, dword [esp + 0x1e4]
mov dword [esp + 0x10], eax
test ebp, ebp
je 0x4070fb
mov ecx, dword [esp + 0x1e8]
cmp byte [ecx], 0
je 0x4070fb
push 0x1a
pop ecx
mov esi, ebp
lea edi, [esp + 0x94]
rep movsd dword es:[edi], dword [esi]
jmp 0x407159
xor edx, edx
test ebx, ebx
je 0x40711b
mov esi, eax
lea eax, [esp + 0x14]
sub esi, eax
lea ecx, [esp + 0x14]
add ecx, edx
mov al, byte [esi + ecx]
xor al, 0x36
inc edx
mov byte [ecx], al
cmp edx, ebx
jb 0x407109
cmp ebx, edi
jae 0x407135
mov eax, edi
lea ecx, [esp + 0x14]
sub eax, ebx
add ecx, ebx
push eax
push 0x36
push ecx
call fcn.00420e20
add esp, 0xc
lea eax, [esp + 0x94]
push eax
call fcn.00411135
push edi
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x9c]
push eax
call fcn.0041117b
test ebp, ebp
je 0x407176
mov eax, dword [esp + 0x1e8]
cmp byte [eax], 0
jne 0x407176
push 0x1a
pop ecx
lea esi, [esp + 0x94]
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov byte [eax], 1
push dword [esp + 0x1dc]
lea eax, [esp + 0x98]
push dword [esp + 0x1dc]
push eax
call fcn.0041117b
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x98]
push eax
call fcn.00411052
mov ebp, dword [esp + 0x1ec]
test ebp, ebp
je 0x4071ca
mov eax, dword [esp + 0x1f0]
cmp byte [eax], 0
je 0x4071ca
push 0x1a
pop ecx
mov esi, ebp
lea edi, [esp + 0xfc]
rep movsd dword es:[edi], dword [esi]
jmp 0x407234
test ebx, ebx
je 0x4071ec
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
sub edx, eax
xor esi, esi
lea ecx, [esp + 0x14]
add ecx, esi
mov al, byte [edx + ecx]
xor al, 0x5c
inc esi
mov byte [ecx], al
cmp esi, ebx
jb 0x4071da
cmp ebx, 0x40
jae 0x407208
push 0x40
pop eax
sub eax, ebx
lea ecx, [esp + 0x14]
push eax
add ecx, ebx
push 0x5c
push ecx
call fcn.00420e20
add esp, 0xc
lea eax, [esp + 0xfc]
push eax
call fcn.00411135
push 0x40
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x104]
push eax
call fcn.0041117b
test ebp, ebp
je 0x40724a
mov eax, dword [esp + 0x1f0]
cmp byte [eax], 0
jne 0x40724a
push 0x1a
pop ecx
lea esi, [esp + 0xfc]
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov byte [eax], 1
push 0x20
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x104]
push eax
call fcn.0041117b
push dword [esp + 0x1e0]
lea eax, [esp + 0x100]
push eax
call fcn.00411052
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1bc
ret 0x24
Function at 0x40727f
Capabilities:
Encode data using xor

Disassembly:
push ebp
lea ebp, [esp - 0x58]
sub esp, 0x190
push ebx
push esi
mov esi, dword [ebp + 0x6c]
push edi
push 0x40
pop eax
cmp esi, eax
jae 0x407299
mov eax, esi
push eax
push dword [ebp + 0x68]
lea eax, [ebp - 0x48]
push eax
call fcn.00422a30
add esp, 0xc
mov dword [ebp + esi - 0x48], 0x1000000
xor eax, eax
push eax
push eax
push eax
push eax
lea eax, [ebp + 0x1c]
push eax
lea eax, [esi + 4]
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 0x64]
push dword [ebp + 0x60]
call fcn.00407074
push 0x20
pop ebx
push ebx
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp - 4]
push eax
call fcn.00422a30
mov eax, dword [ebp + 0x7c]
add esp, 0xc
dec eax
mov byte [ebp + 0x56], 0
mov dword [ebp + 0x48], eax
xor esi, esi
mov byte [ebp + 0x57], 0
push 0x10
pop eax
mov dword [ebp + 0x4c], eax
mov dword [ebp + 0x50], eax
mov eax, dword [ebp + 0x70]
mov dword [ebp + 0x3c], eax
mov eax, dword [ebp + 0x74]
mov dword [ebp + 0x40], eax
mov eax, dword [ebp + 0x78]
mov dword [ebp + 0x44], eax
mov edi, dword [ebp + esi + 0x48]
test edi, edi
je 0x407365
lea eax, [ebp + 0x57]
push eax
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp + 0x56]
push eax
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x68]
push eax
push ebx
lea eax, [ebp + 0x1c]
push eax
push dword [ebp + 0x64]
push dword [ebp + 0x60]
call fcn.00407074
push ebx
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0x1c]
push eax
call fcn.00422a30
add esp, 0xc
xor ecx, ecx
mov al, byte [ebp + ecx + 0x1c]
xor byte [ebp + ecx - 4], al
inc ecx
cmp ecx, ebx
jb 0x407353
sub edi, 1
jne 0x407316
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + esi + 0x3c]
call fcn.00422a30
add esi, 4
add esp, 0xc
cmp esi, 0xc
jb 0x40730e
push 0x44
lea eax, [ebp - 0x48]
push eax
call fcn.00410564
push ebx
lea eax, [ebp - 4]
push eax
call fcn.00410564
push ebx
lea eax, [ebp + 0x1c]
push eax
call fcn.00410564
push ebx
lea eax, [ebp - 0x68]
push eax
call fcn.00410564
pop edi
pop esi
pop ebx
add ebp, 0x58
leave
ret 0x20
Function at 0x40a3a2
Capabilities:
Move file

Disassembly:
mov eax, 0x433746
call fcn.0041fb6c
mov eax, 0x5044
call fcn.0041fc40
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x4050]
push edi
mov ebx, 0x800
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x40a563
cmp eax, ebx
jae 0x40a563
push ebx
lea eax, [ebp - 0x5050]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x40a563
cmp eax, ebx
jae 0x40a563
lea eax, [ebp - 0x4050]
push eax
call fcn.0040d489
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x5050]
push eax
call fcn.0040d489
mov edi, eax
xor ebx, ebx
cmp word [edi], bx
je 0x40a563
push edi
push dword [ebp - 0x10]
call fcn.004130e6
test eax, eax
je 0x40a563
push edi
push esi
call fcn.0040d489
push eax
call fcn.004130e6
test eax, eax
jne 0x40a563
mov word [ebp - 0x1010], ax
mov edi, ebx
test ax, ax
jne 0x40a4c3
push 0x800
push esi
lea eax, [ebp - 0x1010]
push eax
call fcn.00411708
push edi
push str.rtmp_d
push 0x800
lea eax, [ebp - 0x1010]
push eax
call fcn.0040d489
push eax
call fcn.00404a00
add esp, 0x10
lea eax, [ebp - 0x1010]
push eax
call fcn.0040b281
test al, al
je 0x40a4a8
xor eax, eax
mov word [ebp - 0x1010], ax
jmp 0x40a4af
mov ax, word [ebp - 0x1010]
add edi, 0x7b
cmp edi, 0x2710
jl 0x40a456
test ax, ax
je 0x40a563
mov edi, 0x800
lea eax, [ebp - 0x3050]
push edi
push esi
push eax
call fcn.00411708
push edi
push dword [ebp - 0x10]
lea eax, [ebp - 0x3050]
push eax
call fcn.0040d4ff
lea eax, [ebp - 0x1010]
push eax
lea eax, [ebp - 0x3050]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40a563
lea ecx, [ebp - 0x2050]
call fcn.0040a576
push esi
mov dword [ebp - 4], ebx
call fcn.0040b281
test al, al
jne 0x40a526
push 0x12
push esi
lea ecx, [ebp - 0x2050]
call fcn.0040a68e
mov bl, al
lea eax, [ebp - 0x3050]
push eax
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test bl, bl
je 0x40a554
lea ecx, [ebp - 0x2050]
call fcn.0040a640
lea ecx, [ebp - 0x2050]
call fcn.0040a76e
lea ecx, [ebp - 0x2050]
call fcn.0040a5ba
mov al, 1
jmp 0x40a565
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x40a900
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x1050
call fcn.0041fc40
push ebx
mov ebx, dword [esp + 0x105c]
push ebp
push edi
mov edi, ecx
and dword [edi + 0x1034], 0
cmp byte [edi + 0x30], 0
jne 0x40a92c
test bl, 4
jne 0x40a92c
xor al, al
jmp 0x40a92e
mov al, 1
push esi
mov esi, ebx
shr esi, 1
not esi
and esi, 1
inc esi
shl esi, 0x1e
test bl, 1
je 0x40a947
or esi, 0x40000000
shr ebx, 3
not ebx
and ebx, 1
test al, al
je 0x40a956
or ebx, 2
lea ecx, [esp + 0x18]
call fcn.004079c5
cmp byte [edi + 0x24], 0
je 0x40a96b
or esi, 0x100
push 0
push 0x8000000
push 3
push 0
push ebx
push esi
push dword [esp + 0x107c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40a9db
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x18]
push 0x800
push eax
push dword [esp + 0x106c]
call fcn.0040ccf2
test al, al
je 0x40a9e8
push 0
push 0x8000000
push 3
push 0
push ebx
push esi
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40a9e3
mov dword [esp + 0x10], eax
jmp 0x40a9e3
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
cmp ebp, 0xffffffff
jne 0x40a9f9
cmp dword [esp + 0x10], 2
jne 0x40a9f9
mov dword [edi + 0x1034], 1
cmp byte [edi + 0x24], 0
pop esi
je 0x40aa1f
cmp ebp, 0xffffffff
je 0x40aa1f
or dword [esp + 0xc], 0xffffffff
lea eax, [esp + 0xc]
or dword [esp + 0x10], 0xffffffff
push 0
push eax
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor eax, eax
cmp ebp, 0xffffffff
mov byte [edi + 0x1c], al
mov dword [edi + 0x10], eax
setne bl
mov byte [edi + 0x15], al
je 0x40aa4e
push 0x800
push dword [esp + 0x1064]
lea ecx, [edi + 0x32]
mov dword [edi + 8], ebp
push ecx
call fcn.00411708
mov byte [edi + 0x25], 0
pop edi
pop ebp
mov al, bl
pop ebx
add esp, 0x1050
ret 8