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

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x7407110f
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x740710b6
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x740710c5
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 0x74476d68
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 0x74071116
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.74057f8c
cmp eax, dword [ebp + 0xc]
pop eax
je 0x740711b5
add edi, 4
add eax, 2
dec ecx
jne 0x740710fb
call 0x74071162
loope 0x74071158
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x740711b2
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 0x740711c3
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 0x74071176
cmp eax, ecx
ja 0x74071176
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x74071200
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x740711f6
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.7405846b
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
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 sub.KERNEL32.DLL_SetLastError
sub esp, 4
mov ecx, 0
jmp 0x401ada
movzx eax, byte [ecx]
and eax, 3
shl eax, 4
movzx eax, byte [eax + section.1748riil]
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.1748riil]
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.1748riil]
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.1748riil]
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.1748riil]
mov byte [ebx + 2], al
movzx eax, byte [ecx + 2]
and eax, 0x3f
movzx eax, byte [eax + section.1748riil]
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 0x401b7e
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, 0
mov dword [esp], 0
call sub.msvcrt.dll_malloc
mov esi, eax
mov dword [esp + 4], 0x40e000
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov edi, eax
mov eax, 0
test edi, edi
je 0x401c23
jmp 0x401bc1
mov eax, 0
jmp 0x401c23
test byte [edi + 0xc], 0x10
jne 0x401c00
inc ebx
mov dword [esp + 4], ebx
mov dword [esp], esi
call sub.msvcrt.dll_realloc
mov esi, eax
test eax, eax
je 0x401bba
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [eax + ebx - 1]
mov dword [esp], eax
call sub.msvcrt.dll_fread
test byte [edi + 0xc], 0x10
je 0x401bc7
lea eax, [ebx - 1]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00401b44
mov ebx, eax
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [esp], edi
call sub.msvcrt.dll_fclose
mov eax, ebx
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40f640
Capabilities:
Encode data using xor

Disassembly:
dec esi
sub edi, ebp
mov eax, dword [0x380f1ce4]
cli
mov ebp, 0x1fa3b7bd
clc
push esp
xor esi, dword [ebx + ebp*8 + 0xb]
dec edx
aam 0xaf
fbld tbyte [edx - 0x1bad31dc]
push cs
push ss
xchg bl, dh
push esp
movsd dword es:[edi], dword [esi]
dec ecx
xchg ebx, eax
push edx
jne 0x40f650
fbld tbyte [eax]
mov esp, 0x15e37340
test al, 0xeb
or byte [edx], 0xe6
push ebx
pavgw mm7, mm1
sahf
dec esp
salc
out 0xf3, eax
sbb eax, 0x8fdbad6
rcl dword [edi + 0x23]
retf

Function at 0x1645058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.016451a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x164507e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x164506a
add dl, dl
jne 0x1645089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x16450dc
xor eax, eax
add dl, dl
jne 0x1645096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x164517d
add dl, dl
jne 0x16450a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x16450b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x16450bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x16450c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x16450d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x1645075
mov eax, 1
add dl, dl
jne 0x16450ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x16450f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x16450e1
sub eax, ebx
mov ebx, 1
jne 0x1645128
mov ecx, 1
add dl, dl
jne 0x164510e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1645119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1645105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1645075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x164513f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x164514a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1645136
cmp eax, 0x7d00
jae 0x164516d
cmp eax, 0x500
jb 0x1645168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1645075
cmp eax, 0x7f
ja 0x1645170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1645075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x164519e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x1645075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x41d385
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
pushal
call 0x41d394
pop dword [ebp - 0x18]
mov eax, 0x64b120ac
sub eax, 0x646f4d18
sub dword [ebp - 0x18], eax
push 0x40
push 0x1000
push 0x51d7c
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x18]
call dword [eax]
mov ecx, 0xeab72a07
add ecx, 0x15492274
xor edi, edi
add edi, eax
mov ebx, 0xe7b7c32a
sub ebx, 0xe770332a
add ebx, dword [ebp - 0x18]
mov esi, 0x15c3cb45
xor dword [ebp - 0x14], 0x3787c34b
mov edx, dword [ebx]
xor dword [ebp - 0x14], 0xe280aef7
add edx, esi
mov dword [ebp - 0x14], 0xbbb01f3
mov dword [edi], edx
sub dword [ebp - 8], 0x843199e2
add edi, 0x9a0fd3fb
add edi, 0x65f02c09
add ebx, 0x222d9126
add ebx, 0xddd26ede
loop 0x41d3ea
add eax, 0x45bc4b76
add eax, 0xba44d949
xor ebx, ebx
add ebx, eax
add eax, 0x4a3176db
add eax, 0xb5ce892a
mov ecx, 0x400000
add ecx, dword [ebp - 0x18]
call ebx
leave
ret

Function at 0x444db9
Capabilities:
Encrypt data using dpapi

Disassembly:
push esi
push edi
push 0x46f748
push str.AdvApi32.dll
call main
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov esi, eax
test esi, esi
js 0x444dfc
push str.SystemFunction040
push dword [0x46f748]
call edi
push str.SystemFunction041
push dword [0x46f748]
mov dword [0x46f738], eax
call edi
mov dword [0x46f73c], eax
jmp 0x444e01
mov eax, dword [0x46f73c]
cmp dword [0x46f738], 0
je 0x444e12
test eax, eax
jne 0x444eb9
push 0x46f74c
push str.Crypt32.dll
call main
mov esi, eax
test esi, esi
js 0x444ec3
push str.CryptProtectMemory
push dword [0x46f74c]
call edi
cmp dword [0x46f738], 0
mov dword [0x46f740], eax
jne 0x444e77
test eax, eax
jne 0x444e77
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x444e61
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x444e68
mov esi, 0x80004005
push esi
push 0x28
push str.c:_agent_work35_swix_srclibsdutilcryputil.cpp
call fcn.004013b3
jmp 0x444ec3
push str.CryptUnprotectMemory
push dword [0x46f74c]
call edi
cmp dword [0x46f73c], 0
mov dword [0x46f744], eax
jne 0x444eb9
test eax, eax
jne 0x444eb9
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x444ead
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x444eb4
mov esi, 0x80004005
push esi
push 0x2d
jmp 0x444e6b
mov dword [0x46f750], 1
pop edi
mov eax, esi
pop esi
ret
Function at 0x404464
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x404485
jl 0x40447c
test edi, edi
jne 0x404485
xor eax, eax
xor edx, edx
jmp 0x404546
cmp dword [ebx + 0x38], 0
je 0x40449a
push eax
push edi
push dword [ebp + 8]
call fcn.0040454c
jmp 0x404546
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x4044e1
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x4044e1
cmp eax, edi
jb 0x4044bb
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.00406470
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x4044e7
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x40453b
mov ecx, ebx
call fcn.00403cb3
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x404526
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.0040a9b2
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x40453b
jmp 0x4044f9
test edx, edx
je 0x40453b
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.0040a9b2
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x405c52
Capabilities:
Parse pe header

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

Function at 0x40fcbf
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4202e8
push 0x4202e0
push str.FlsAlloc
push 0x1f
call fcn.0040fb2a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40fcf3
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d138]
call esi
jmp 0x40fcf9
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40fd3d
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4202f8
push 0x4202f0
push str.FlsGetValue
push 0x21
call fcn.0040fb2a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40fd74
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d138]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x40fd7c
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x420300
push 0x4202f8
push str.FlsSetValue
push 0x22
call fcn.0040fb2a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40fdb6
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41d138]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x411df2
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00405dc0
mov eax, dword [0x427040]
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.00410a39
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x411e34
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x411f90
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0041b7e0
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 + 0x428990]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00412def
mov ecx, dword [esi*4 + 0x428990]
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 0x411f89
cmp eax, dword [ecx + edi + 0x24]
jne 0x411f89
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 0x411f89
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00412def
add esp, 0x14
test edx, edx
jl 0x411f89
jg 0x411eff
test eax, eax
jb 0x411f89
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x411f89
jl 0x411f19
cmp dword [ebp - 0x1008], eax
ja 0x411f89
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x411f37
test ebx, ebx
je 0x411f70
cmp ecx, edi
jae 0x411f70
mov al, byte [ecx]
cmp al, 0xd
jne 0x411f51
lea eax, [edi - 1]
cmp ecx, eax
jae 0x411f5d
cmp byte [ecx + 1], 0xa
jne 0x411f5d
inc ecx
jmp 0x411f5d
movzx eax, al
movsx eax, byte [eax + 0x427310]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x411f37
cmp edx, ebx
jne 0x411f37
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x411f8e
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00404ecc
leave
ret
Function at 0x412287
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 + 0x428990]
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 0x4122c7
cmp byte [ebx], 0xa
jne 0x4122c7
or byte [edi + eax + 0x28], 4
jmp 0x4122cc
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 0x4123cb
mov dl, byte [eax]
cmp dl, 0x1a
je 0x4123ae
inc eax
cmp dl, 0xd
je 0x4122f8
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x41231e
cmp eax, ecx
jae 0x41232c
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 0x4122e0
jmp 0x4123cb
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 0x4123a9
cmp dword [ebp - 0x10], 0
je 0x4123a9
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x428990]
test byte [eax + edi + 0x28], 0x48
je 0x412383
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x41236e
mov byte [esi], dl
jmp 0x41237f
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x428990]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4123cb
cmp byte [ebp - 1], 0xa
jne 0x412392
cmp esi, ebx
jne 0x412392
mov byte [esi], 0xa
jmp 0x4123ca
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00412e0d
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4123cb
mov byte [esi], 0xd
jmp 0x4123ca
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x428990]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4123c8
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4123cb
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4123d4
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 + 0x428990]
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 0x41241a
cmp word [ebx], dx
jne 0x41241a
or byte [eax + edi + 0x28], 4
jmp 0x41241f
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 0x412582
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 0x412562
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x412460
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x412496
cmp eax, edx
jae 0x4124a4
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 0x41243b
jmp 0x412582
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 0x41255d
cmp dword [ebp - 0x18], 0
je 0x41255d
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x428990]
test byte [eax + edi + 0x28], 0x48
je 0x412533
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 0x4124f7
mov word [esi], cx
jmp 0x41252e
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x428990]
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 + 0x428990]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x428990]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x412582
pop eax
cmp word [ebp - 4], ax
jne 0x412543
cmp esi, ebx
jne 0x412543
mov word [esi], ax
jmp 0x41257f
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00412e0d
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x412582
push 0xd
pop eax
jmp 0x41253e
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x428990]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x41257c
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x412582
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x415b40
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x415bdd
push ebx
push esi
call fcn.00415b09
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.004147fb
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x415b8a
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x415bdc
push edi
push eax
call fcn.00410017
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x415baa
call fcn.0040f222
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x415bdb
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004147fb
add esp, 0x20
test eax, eax
jne 0x415bc9
push edi
call fcn.0040f222
jmp 0x415bd1
push ebx
call fcn.0040f222
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x41820a
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.0040f59a
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x418279
cmp esi, dword [ebp - 4]
je 0x418274
cmp dword [ebp + 0xc], 0
je 0x418274
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x418251
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.00417d5c
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x41827b
xor eax, eax
inc eax
jmp 0x41827b
xor eax, eax
pop edi
pop esi
leave
ret