joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40cc1a
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ecx
mov byte [ebp - 0x34d], 0x75
mov byte [ebp - 0x34c], 0x57
mov byte [ebp - 0x34b], 0x4a
mov byte [ebp - 0x34a], 0x46
mov byte [ebp - 0x349], 0x40
mov byte [ebp - 0x348], 0x56
mov byte [ebp - 0x347], 0x56
mov ecx, 0x56fffffc
mov byte [ebp - 0x346], 0x6d
mov byte [ebp - 0x345], 0x40
mov byte [ebp - 0x344], 0x44
mov byte [ebp - 0x343], 0x55
mov byte [ebp - 0x342], 0x25
lea eax, [ebp - 0x354]
push eax
call fcn.0040c3e7
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.0040c39c
add esp, 0xc
mov dword [ebp - 0x68c], eax
call dword [ebp - 0x68c]
mov dword [ebp - 0x674], eax
mov dword [ebp - 0x384], 4
and byte [ebp - 0x334], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x333]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al

Function at 0x40ccbe
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov dword [ebp - 0x670], 4
and byte [ebp - 0x3c4], 0
and byte [ebp - 0x3c3], 0
mov byte [ebp - 0x3c2], 0x99
and byte [ebp - 0x3c1], 0
mov byte [ebp - 0x3c0], 0x21
mov byte [ebp - 0x3bf], 3
mov byte [ebp - 0x3be], 0x12
mov byte [ebp - 0x3bd], 0x2b
mov byte [ebp - 0x3bc], 9
mov byte [ebp - 0x3bb], 2
mov byte [ebp - 0x3ba], 0x13
mov byte [ebp - 0x3b9], 0xa
mov byte [ebp - 0x3b8], 3
mov byte [ebp - 0x3b7], 0x20
mov byte [ebp - 0x3b6], 0xf
mov byte [ebp - 0x3b5], 0xa
mov byte [ebp - 0x3b4], 3
mov byte [ebp - 0x3b3], 0x28
mov byte [ebp - 0x3b2], 7
mov byte [ebp - 0x3b1], 0xb
mov byte [ebp - 0x3b0], 3
mov byte [ebp - 0x3af], 0x27
mov byte [ebp - 0x3ae], 0x66
lea eax, [ebp - 0x3c4]
push eax
call fcn.0040c3e7
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.0040c39c
add esp, 0xc
mov dword [ebp - 0x538], eax
and byte [ebp - 0x3ec], 0
and byte [ebp - 0x3eb], 0
mov byte [ebp - 0x3ea], 0x11
and byte [ebp - 0x3e9], 0
mov byte [ebp - 0x3e8], 0xa9
mov byte [ebp - 0x3e7], 0x8b
mov byte [ebp - 0x3e6], 0x9a
mov byte [ebp - 0x3e5], 0xa3
mov byte [ebp - 0x3e4], 0x81
mov byte [ebp - 0x3e3], 0x8a
mov byte [ebp - 0x3e2], 0x9b
invalid
Function at 0x4123a9
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 0x4123eb
call fcn.0041ab24
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4123eb
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4123e2
xor eax, eax
jmp 0x4123f3
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004123f9
pop edi
pop esi
pop ebx
ret 4

Function at 0x41484a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x41daa4
call fcn.004057fc
sub esp, 0x18
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x44]
mov dword [ebp - 0x18], eax
call fcn.0041ab24
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x414889
call fcn.0041ab24
mov ebx, dword [eax + 0xc]
push 5
push dword [esi + 0x40]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x414897
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4148a5
or eax, 0xffffffff
jmp 0x41498d
mov ecx, esi
call fcn.004147c0
mov dword [ebp - 0x14], eax
call fcn.00410767
xor edi, edi
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
je 0x4148dc
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x4148dc
push edi
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x20], 1
push esi
mov dword [ebp - 4], edi
call fcn.0041071b
push dword [ebp - 0x14]
call fcn.00410269
push ebx
push eax
push dword [ebp - 0x18]
mov ecx, esi
call fcn.0041454d
cmp eax, edi
je 0x41494f
test byte [esi + 0x24], 0x10
je 0x41491d
push 4
mov ecx, esi
pop ebx
call fcn.00412b71
test ah, 1
je 0x414915
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.004124fb
cmp dword [esi + 0x1c], edi
je 0x41494f
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.00412bfd
jmp 0x41494f
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], edi
je 0x414963
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x41497c
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x41497c
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x58]
mov ecx, esi
call fcn.004147fa
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x41bc32
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x41bc60
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x41bc7e
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0041bb98
jmp 0x41bc7e
mov eax, dword [esi + 0x14]
test eax, eax
je 0x41bc7e
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0041bb98
test edi, edi
mov eax, edi
jne 0x41bc68
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x41c1c2
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0x41c272
mov ecx, 0x42b858
call fcn.0041bd1f
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov esi, eax
cmp word [esi + 8], 0
jne 0x41c250
push str.COMCTL32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov dword [ebp + 0xc], eax
je 0x41c22e
mov ecx, dword [ebp + 0x10]
push 5
neg ecx
sbb ecx, ecx
and ecx, 0xe
add ecx, 0x3ee
movzx ecx, cx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x41c22e
push ebx
push edi
push eax
call fcn.004152a1
add esp, 0xc
mov eax, dword [edi]
mov eax, dword [eax - 8]
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 4], eax
push dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ax, word [ebx]
mov word [esi + 8], ax
push dword [esi + 4]
mov ecx, edi
call fcn.00413205
mov si, word [esi + 8]
xor eax, eax
mov word [ebx], si
cmp si, 0xffff
pop edi
pop esi
setne al
pop ebx
pop ebp
ret 0xc
Function at 0x4024e0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push eax
push 0x47ab50
call fcn.00406ac0
add eax, 0x40
push eax
call fcn.00407440
add esp, 0xc
push 2
call fcn.00406e90
pop ebp
ret
Function at 0x403b80
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x47b710]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00409680
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x403c62
mov dword [ebp - 0x114], 0
jmp 0x403bc7
mov ecx, dword [ebp - 0x114]
add ecx, 1
mov dword [ebp - 0x114], ecx
cmp dword [ebp - 0x114], 2
jae 0x403c62
lea edx, [ebp - 8]
push edx
push 0x20019
push 0
push str.SoftwareVI_Like_EmacsEnvironment
mov eax, dword [ebp - 0x114]
mov ecx, dword [eax*4 + 0x47ae88]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403c5d
mov dword [ebp - 0xc], 0x100
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x110]
push eax
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403c53
cmp dword [ebp - 0xc], 0
je 0x403c53
mov eax, dword [ebp - 0xc]
mov byte [ebp + eax - 0x111], 0
lea ecx, [ebp - 0x110]
push ecx
call fcn.00403b40
add esp, 4
mov dword [ebp - 4], eax
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x403c62
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x403bb8
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00409ba0
mov esp, ebp
pop ebp
ret
Function at 0x403d40
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push 0x47c6e5
push 2
call fcn.0040a7f0
add esp, 8
call fcn.00406ac0
mov dword [0x47c6e0], eax
call fcn.00406ac0
add eax, 0x20
mov dword [0x47c5dc], eax
mov dword [0x47c5d8], 0
mov dword [0x47c5d0], 1
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00403f80
add esp, 0xc
mov edx, dword [0x47ab3c]
push edx
call fcn.00404e50
add esp, 4
push 1
call dword [0x47ab44]
add esp, 4
push 0x47aeb4
call fcn.00405110
add esp, 4
mov eax, dword [0x47ab3c]
push eax
push 0x47aebc
call fcn.00409ff0
add esp, 8
test eax, eax
je 0x403ddf
mov ecx, dword [0x47ab3c]
push ecx
call fcn.00405110
add esp, 4
push 1
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00403f80
add esp, 0xc
mov dword [ebp - 4], eax
xor ecx, ecx
cmp dword [0x47d40c], 0
sete cl
mov dword [0x47d248], ecx
cmp dword [0x47d248], 0
je 0x403e4f
mov edx, dword [0x47d24c]
push edx
push 0x47aec4
call fcn.00409ff0
add esp, 8
test eax, eax
je 0x403e4f
mov eax, dword [0x47d24c]
push eax
mov ecx, dword [0x47ab3c]
push ecx
call fcn.00409ff0
add esp, 8
test eax, eax
je 0x403e4f
mov edx, dword [0x47d24c]
push edx
call fcn.00405110
add esp, 4
mov eax, dword [0x47d24c]
push eax
call fcn.004064e0
add esp, 4
push 0
call dword [0x47ab44]
add esp, 4
cmp dword [0x47d424], 0
jne 0x403e7a
cmp dword [0x47d3a4], 0
je 0x403ed3
mov dword [ebp - 8], 0x47aecc
push str.rr_.:
mov ecx, dword [ebp - 8]
push ecx
call fcn.00409fd0
add esp, 8
mov dword [0x47c6e0], eax
cmp dword [0x47c6e0], 0
je 0x403ebe
mov edx, dword [0x47c6e0]
push edx
call dword [0x47ab48]
add esp, 4
mov eax, dword [0x47c6e0]
push eax
call fcn.00409bb0
add esp, 4
cmp dword [0x47d3a4], 0
je 0x403ed1
push 0
call fcn.004047d0
add esp, 4
jmp 0x403f49
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jge 0x403f39
mov edx, dword [ebp - 4]
cmp edx, dword [ebp + 8]
jge 0x403f37
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
push 0x47aed4
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00409fd0
add esp, 8
mov dword [0x47c6e0], eax
cmp dword [0x47c6e0], 0
je 0x403f35
mov edx, dword [0x47c6e0]
push edx
call dword [0x47ab48]
add esp, 4
mov eax, dword [0x47c6e0]
push eax
call fcn.00409bb0
add esp, 4
jmp 0x403edb
jmp 0x403f49
mov ecx, dword [0x47c6e0]
push ecx
call dword [0x47ab48]
add esp, 4
mov edx, dword [0x47c5dc]
push edx
call fcn.00409110
add esp, 4
mov eax, dword [0x47c5dc]
push eax
call fcn.00409bb0
add esp, 4
push 0
call fcn.00406e90
mov esp, ebp
pop ebp
ret
Function at 0x403f80
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push 0x400
push 0
push 0x47d260
call fcn.0040bd10
add esp, 0xc
mov dword [ebp - 8], 1
jmp 0x403fac
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp + 8]
jge 0x404111
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx*4]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx]
cmp eax, 0x2d
jne 0x40410a
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx]
test eax, eax
je 0x404108
mov ecx, dword [ebp - 0xc]
movzx edx, byte [ecx]
mov eax, dword [edx*4 + 0x47d260]
add eax, 1
mov ecx, dword [ebp - 0xc]
movzx edx, byte [ecx]
mov dword [edx*4 + 0x47d260], eax
mov eax, dword [ebp - 0xc]
mov cl, byte [eax]
mov byte [ebp - 0x10], cl
cmp byte [ebp - 0x10], 0x6b
je 0x40401d
cmp byte [ebp - 0x10], 0x74
je 0x40405b
jmp 0x40409c
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0xc]
push edx
call fcn.00404120
add esp, 0x10
mov dword [ebp - 4], eax
cmp dword [ebp + 0x10], 0
je 0x404056
mov eax, dword [ebp - 4]
push eax
call fcn.00404db0
add esp, 4
mov ecx, dword [ebp - 4]
push ecx
call fcn.004050c0
add esp, 4
jmp 0x404103
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0xc]
push edx
call fcn.00404120
add esp, 0x10
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push eax
call fcn.0040bcf0
add esp, 4
mov dword [0x47d430], eax
cmp dword [0x47d430], 0
jg 0x40409a
mov dword [0x47d430], 8
jmp 0x404103
cmp dword [0x47ab4c], 0
je 0x4040be
mov ecx, dword [ebp - 0xc]
movsx edx, byte [ecx]
push edx
mov eax, dword [0x47ab4c]
push eax
call fcn.00408200
add esp, 8
test eax, eax
je 0x4040c7
cmp dword [0x47ab4c], 0
jne 0x404103
mov ecx, dword [ebp - 0xc]
movsx edx, byte [ecx]
push edx
push 0x47ae4c
call fcn.00408200
add esp, 8
test eax, eax
jne 0x404103
mov eax, dword [ebp - 0xc]
movsx ecx, byte [eax]
push ecx
push str.unknown_option__c_n
call fcn.00406ac0
add eax, 0x40
push eax
call fcn.00407440
add esp, 0xc
push 1
call fcn.00406e90
jmp 0x403fd3
jmp 0x40410c
jmp 0x404111
jmp 0x403fa3
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x409ba0
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x47b710]
jne 0x409baa
repz ret
jmp fcn.00418ae0
Function at 0x409840
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov eax, dword [0x40e300]
cmp ebx, eax
jae 0x40986d
mov eax, ebx
and eax, 0x1f
mov edx, ebx
sar edx, 5
mov edx, dword [edx*4 + 0x40e304]
test byte [edx + eax*8 + 4], 1
jne 0x40987f
mov dword [0x40d334], 9
or eax, 0xffffffff
jmp 0x40999c
push 1
push 0
push ebx
call fcn.00408af0
add esp, 0xc
mov esi, eax
cmp eax, 0xffffffff
je 0x4098a7
push 2
push 0
push ebx
call fcn.00408af0
add esp, 0xc
mov edi, eax
cmp eax, 0xffffffff
jne 0x4098af
or eax, 0xffffffff
jmp 0x40999c
mov eax, dword [ebp + 0xc]
neg edi
add edi, eax
jle 0x409941
push 0x1000
push 1
call fcn.00409e10
add esp, 8
mov dword [ebp - 4], eax
test eax, eax
je 0x40993b
push 0x8000
push ebx
call fcn.00409e70
add esp, 8
mov dword [ebp - 8], eax
mov eax, 0x1000
cmp edi, 0x1000
jge 0x4098f2
mov eax, edi
mov edx, eax
push edx
mov eax, dword [ebp - 4]
push eax
push ebx
call fcn.004074e0
add esp, 0xc
mov dword [ebp + 0xc], eax
cmp eax, 0xffffffff
jne 0x409910
or dword [ebp - 0xc], 0xffffffff
jmp 0x409922
mov eax, edi
sub eax, dword [ebp + 0xc]
mov edi, eax
mov dword [ebp - 0xc], 0
test eax, eax
jg 0x4098e3
mov eax, dword [ebp - 8]
push eax
push ebx
call fcn.00409e70
add esp, 8
mov eax, dword [ebp - 4]
push eax
call fcn.004040b0
pop ecx
jmp 0x40998d
or dword [ebp - 0xc], 0xffffffff
jmp 0x40998d
mov dword [ebp - 0xc], 0
test edi, edi
jge 0x40998d
push 0
mov eax, dword [ebp + 0xc]
push eax
push ebx
call fcn.00408af0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x409966
or dword [ebp - 0xc], 0xffffffff
jmp 0x40998d
push ebx
call fcn.00407980
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [ebp - 0xc], 0
test eax, eax
jne 0x40998d
mov dword [0x40d334], 0xd
or dword [ebp - 0xc], 0xffffffff
push 0
push esi
push ebx
call fcn.00408af0
add esp, 0xc
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x401996
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
test ebx, ebx
sete dl
cmp dword [ebp + 8], 0
sete al
mov ecx, 0
or dl, al
jne 0x401ada
lea ecx, [edi*4 + 0xb]
mov edx, 0x2aaaaaab
mov eax, ecx
imul edx
sar edx, 1
mov eax, ecx
sar eax, 0x1f
sub edx, eax
lea edx, [edx*4 + 1]
cmp edx, dword [ebp + 0x14]
jle 0x401a3d
mov dword [esp], 0x6f
call 0x40c300
sub esp, 4
mov ecx, 0
jmp 0x401ada
movzx eax, byte [ecx]
and eax, 3
shl eax, 4
movzx eax, byte [eax + section.f234lycq]
mov byte [ebx + 1], al
mov byte [ebx + 2], 0x3d
mov byte [ebx + 3], 0x3d
add ebx, 4
jmp 0x401ad2
movzx eax, byte [ecx + 1]
and eax, 0xf
movzx eax, byte [eax*4 + section.f234lycq]
mov byte [ebx + 2], al
mov byte [ebx + 3], 0x3d
add ebx, 4
jmp 0x401ad2
mov esi, 0
mov ecx, dword [ebp + 8]
cmp esi, edi
jge 0x401ad2
movzx eax, byte [ecx]
shr al, 2
movzx eax, al
movzx eax, byte [eax + section.f234lycq]
mov byte [ebx], al
mov eax, edi
sub eax, esi
cmp eax, 1
je 0x4019fc
movzx edx, byte [ecx]
and edx, 3
shl edx, 4
movzx eax, byte [ecx + 1]
shr al, 4
movzx eax, al
or edx, eax
movzx eax, byte [edx + section.f234lycq]
mov byte [ebx + 1], al
mov eax, edi
sub eax, esi
cmp eax, 2
je 0x401a1f
movzx edx, byte [ecx + 1]
and edx, 0xf
shl edx, 2
movzx eax, byte [ecx + 2]
shr al, 6
movzx eax, al
or edx, eax
movzx eax, byte [edx + section.f234lycq]
mov byte [ebx + 2], al
movzx eax, byte [ecx + 2]
and eax, 0x3f
movzx eax, byte [eax + section.f234lycq]
mov byte [ebx + 3], al
add esi, 3
add ecx, 3
add ebx, 4
cmp esi, edi
jl 0x401a4d
mov byte [ebx], 0
mov ecx, 1
mov eax, ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x402a7c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404234
test esi, esi
jne 0x402ab2
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404324
jmp 0x402ad0
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402930
mov edi, eax
test esi, esi
je 0x402ad0
cmp dword [ebx], 0
je 0x402ad0
dec esi
jmp 0x402ab9
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x40334c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x523020]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4033e4
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4033c4
xor eax, eax
push ebp
push 0x4033bd
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403400
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4033c4
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x523020]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x523020], ax
mov esp, ebp
pop ebp
ret

Function at 0x4040b8
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x52904c], 0
je 0x404119
cmp word [0x529220], 0xd7b2
jne 0x4040e1
cmp dword [0x529228], 0
jbe 0x4040e1
mov eax, 0x52921c
call dword [0x529238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x52306c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404140
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x523030], 0
jne 0x404135
push 0
push 0x523064
push 0x52306c
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x4062cc
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x406332
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.004044a4
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402ee0
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x40631c
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406339
lea eax, [ebp - 0x10]
call fcn.00404234
ret

Function at 0x408e6c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.004046f4
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x408e85
test al, 0x10
jne 0x408e89
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x40ba44
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40ba7d
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404324
jmp 0x40ba86
mov eax, ebx
mov edx, esi
call fcn.00404288
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40ba90
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40bab1
mov al, byte [esp]
jmp 0x40bab3
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40c138
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40bfb0
mov eax, dword [0x528638]
cmp byte [eax], 0
je 0x40c1b4
mov eax, dword [0x528358]
call fcn.00402be0
call fcn.0040285c
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x48]
push eax
call sub.user32.dll_CharToOemA
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.00409168
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40c1fc
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40c1ea
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x5282e0]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x529668]
call fcn.004057ac
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret