joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10038d72
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x10038f38
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x10193380]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x10038f38
test cl, 0x48
je 0x10038dd8
mov al, byte [eax + 5]
cmp al, 0xa
je 0x10038dd8
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10038e2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x10038e12
call fcn.10032a56
mov dword [eax], 9
call fcn.10032a5f
mov dword [eax], esi
jmp 0x10038e22
cmp eax, 0x6d
je 0x10038f38
push eax
call fcn.10032a68
pop ecx
or eax, 0xffffffff
jmp 0x10038f3a
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x10038f33
test edx, edx
je 0x10038e4d
cmp byte [ebx], 0xa
jne 0x10038e4d
or al, 4
jmp 0x10038e4f
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x10038f2d
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x10038f1d
cmp al, 0xd
je 0x10038e83
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x10038f0f
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x10038e9d
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x10038e98
add dword [ebp + 0x10], 2
jmp 0x10038ef1
mov dword [ebp + 0x10], eax
jmp 0x10038f0b
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10038ec5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10038f0b
cmp dword [ebp - 0xc], 0
je 0x10038f0b
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x10038ee6
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x10038ef1
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x10038f0e
cmp ebx, dword [ebp + 0xc]
jne 0x10038ef6
cmp byte [ebp - 1], 0xa
jne 0x10038ef6
mov byte [ebx], 0xa
jmp 0x10038f0e
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10039224
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x10038f0f
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x10038e67
jmp 0x10038f2d
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x10038f2d
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x10038f3a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10038fea
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
jne 0x10039008
xor eax, eax
jmp 0x10039176
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x10193380]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x1003903b
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.1003f0f5
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x1003910d
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
jbe 0x10039148
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
mov dword [ebp - 8], edi
cmp ecx, dword [ebp + 0x10]
jae 0x10039096
mov edx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x10039087
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 8]
mov byte [eax], dl
inc eax
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x400
jl 0x1003906a
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x18]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100390d6
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
cmp eax, edi
jl 0x100390df
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x1003905b
jmp 0x100390e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
xor edi, edi
mov eax, dword [ebp - 0x10]
cmp eax, edi
jne 0x10039171
cmp dword [ebp - 4], edi
je 0x10039148
push 5
pop esi
cmp dword [ebp - 4], esi
jne 0x1003913a
call fcn.10032a56
mov dword [eax], 9
call fcn.10032a5f
mov dword [eax], esi
jmp 0x10039143
push edi
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1003912f
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
jmp 0x100390e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x100390e1
push dword [ebp - 4]
call fcn.10032a68
pop ecx
or eax, 0xffffffff
jmp 0x10039174
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x1003915d
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x1003915d
xor eax, eax
jmp 0x10039174
call fcn.10032a56
mov dword [eax], 0x1c
call fcn.10032a5f
mov dword [eax], edi
jmp 0x10039143
sub eax, dword [ebp - 0x14]
pop esi
pop ebx
pop edi
leave
ret
Function at 0x1003b135
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
xor eax, eax
cmp edx, dword [eax*8 + 0x1016f098]
je 0x1003b155
inc eax
cmp eax, 0x12
jb 0x1003b146
shl eax, 3
cmp edx, dword [eax + 0x1016f098]
mov dword [ebp + 8], eax
jne 0x1003b2f3
mov ecx, dword [0x10191d90]
cmp ecx, 1
je 0x1003b2c8
test ecx, ecx
jne 0x1003b187
cmp dword [0x10191d94], 1
je 0x1003b2c8
cmp edx, 0xfc
je 0x1003b2f3
and byte [ebp - 8], 0
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1003b1c2
push 5
pop ecx
mov esi, str._program_name_unknown_
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x10c]
lea ebx, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003b1d1
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x1003b209
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003b1e9
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x101362f0
push ebx
call fcn.1002fa10
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003b20e
sub eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1016f09c]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1003b225
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.1002f510
mov edx, esp
push 6
pop ecx
mov esi, str.Runtime_Error__n_nProgram:
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003b251
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1003b25d
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1003b276
mov eax, dword [ebp + 8]
mov esi, 0x101362d0
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x1016f09c]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003b291
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1003b29d
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.1003f4ad
add esp, 0xc
jmp 0x1003b2f3
mov ecx, dword [eax + 0x1016f09c]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1003b2d3
push 0
lea edx, [ebp - 4]
push edx
sub eax, esi
push eax
push ecx
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x118]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1003b689
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.1002f510
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1003b71e
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x10191d9c]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x1003b71e
cmp eax, 1
je 0x1003b736
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1003b71e
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x1003b6f3
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x1003b71a
xor eax, eax
inc eax
jmp 0x1003b752
cmp esi, ebx
jae 0x1003b722
xor eax, eax
jmp 0x1003b752
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x10191d9c]
jmp 0x1003b738
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1003f4ad
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x101921d0], ebx
push esi
push edi
jne 0x1003f52d
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x1003f568
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x101921d0], eax
je 0x1003f568
push 0x10136614
push edi
call esi
push 0x10136600
push edi
mov dword [0x101921d4], eax
call esi
cmp dword [0x10191d9c], 2
mov dword [0x101921d8], eax
jne 0x1003f52d
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x101921e0], eax
je 0x1003f52d
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x101921dc], eax
mov eax, dword [0x101921dc]
test eax, eax
je 0x1003f572
call eax
test eax, eax
je 0x1003f559
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x101921e0]
test eax, eax
je 0x1003f559
test byte [ebp - 8], 1
jne 0x1003f572
cmp dword [0x10191da8], 4
jb 0x1003f56c
or byte [ebp + 0x12], 0x20
jmp 0x1003f591
xor eax, eax
jmp 0x1003f5a1
or byte [ebp + 0x12], 4
jmp 0x1003f591
mov eax, dword [0x101921d4]
test eax, eax
je 0x1003f591
call eax
mov ebx, eax
test ebx, ebx
je 0x1003f591
mov eax, dword [0x101921d8]
test eax, eax
je 0x1003f591
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x101921d0]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1003f778
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
push esi
push edi
je 0x1003f7e2
push ebx
call fcn.1003f741
test eax, eax
pop ecx
jne 0x1003f7b3
call fcn.10032a5f
mov dword [eax], 0xf
call fcn.10032a56
mov dword [eax], 0xd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
and byte [ebp + 0xb], 0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x108]
push eax
mov esi, 0x104
push esi
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x1003f7f5
lea eax, [ebp - 0x108]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x1003f7ac
inc eax
cmp eax, esi
ja 0x1003f7ac
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x1003f827
cmp eax, dword [ebp + 0x10]
jg 0x1003f80d
mov eax, dword [ebp + 0x10]
push eax
call fcn.1002e5f3
mov edi, eax
test edi, edi
pop ecx
jne 0x1003f83c
call fcn.10032a56
mov dword [eax], 0xc
jmp 0x1003f7ac
cmp eax, dword [ebp + 0x10]
jle 0x1003f83c
call fcn.10032a56
mov dword [eax], 0x22
jmp 0x1003f7ac
mov esi, edi
lea eax, [ebp - 0x108]
lea ecx, [ebp - 0x108]
sub esi, eax
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
test dl, dl
jne 0x1003f84c
mov eax, edi
jmp 0x1003f7ae
Function at 0x1003fa4a
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x10136670
call fcn.1003367c
xor edi, edi
xor ebx, ebx
inc ebx
cmp dword [0x101921f8], edi
jne 0x1003fa8e
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1003fa79
mov dword [0x101921f8], ebx
jmp 0x1003fa8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x1003fa8e
mov dword [0x101921f8], 2
mov eax, dword [0x101921f8]
cmp eax, ebx
jne 0x1003faae
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
jmp 0x1003fb71
cmp eax, 2
je 0x1003fab7
cmp eax, edi
jne 0x1003fadf
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
cmp dword [ebp + 0x18], edi
jne 0x1003faca
mov eax, dword [0x10191fa4]
mov dword [ebp + 0x18], eax
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [ebp - 0x24], eax
cmp eax, edi
jne 0x1003fae6
xor eax, eax
jmp 0x1003fb71
mov dword [ebp - 4], edi
add eax, 3
and eax, 0xfffffffc
call fcn.1002f510
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x28], esi
or dword [ebp - 4], 0xffffffff
jmp 0x1003fb19
cmp esi, edi
jne 0x1003fb2f
push dword [ebp - 0x24]
call fcn.1002e5f3
pop ecx
mov esi, eax
cmp esi, edi
je 0x1003fadf
mov dword [ebp - 0x20], ebx
push dword [ebp - 0x24]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x1003fb62
cmp dword [ebp + 0x14], edi
jne 0x1003fb4c
push edi
push edi
jmp 0x1003fb52
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push esi
push ebx
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], edi
je 0x1003fb6e
push esi
call fcn.1002e4db
pop ecx
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0x34]
call fcn.100336b5
ret
Function at 0x1003fb7a
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x10136680
call fcn.1003367c
xor esi, esi
cmp dword [0x101921fc], esi
jne 0x1003fbbe
push esi
push esi
xor edi, edi
inc edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1003fba9
mov dword [0x101921fc], edi
jmp 0x1003fbbe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x1003fbbe
mov dword [0x101921fc], 2
mov eax, dword [0x101921fc]
cmp eax, 2
je 0x1003fc9f
cmp eax, esi
je 0x1003fc9f
cmp eax, 1
jne 0x1003fc03
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
cmp dword [ebp + 0x18], esi
jne 0x1003fbec
mov eax, dword [0x10191fa4]
mov dword [ebp + 0x18], eax
push esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, esi
jne 0x1003fc0a
xor eax, eax
jmp 0x1003fcb1
mov dword [ebp - 4], esi
lea eax, [ebx + ebx]
add eax, 3
and eax, 0xfffffffc
call fcn.1002f510
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x28], edi
or dword [ebp - 4], 0xffffffff
jmp 0x1003fc40
cmp edi, esi
jne 0x1003fc5b
lea eax, [ebx + ebx]
push eax
call fcn.1002e5f3
pop ecx
mov edi, eax
cmp edi, esi
je 0x1003fc03
mov dword [ebp - 0x20], 1
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1003fc8e
push esi
push esi
cmp dword [ebp + 0x14], esi
jne 0x1003fc78
push esi
push esi
jmp 0x1003fc7e
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push edi
push esi
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], esi
je 0x1003fc9a
push edi
call fcn.1002e4db
pop ecx
mov eax, dword [ebp - 0x1c]
jmp 0x1003fcb1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea esp, [ebp - 0x34]
call fcn.100336b5
ret
Function at 0x10040501
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
call fcn.10039224
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x10040646
push 2
push esi
push dword [ebp + 8]
call fcn.10039224
add esp, 0xc
cmp eax, ebx
je 0x10040646
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x100405e9
mov ebx, 0x1000
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x1004057a
call fcn.10032a56
mov dword [eax], 0xc
or esi, 0xffffffff
jmp 0x10040631
push 0x8000
push dword [ebp + 8]
call fcn.100407f1
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp edi, ebx
mov eax, ebx
jge 0x10040594
mov eax, edi
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.10038fea
add esp, 0xc
cmp eax, 0xffffffff
je 0x100405b0
sub edi, eax
test edi, edi
jg 0x1004058c
jmp 0x100405c8
call fcn.10032a5f
cmp dword [eax], 5
jne 0x100405c5
call fcn.10032a56
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.100407f1
pop ecx
pop ecx
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10040631
jge 0x10040631
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.10039224
push dword [ebp + 8]
call fcn.1003eafa
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x10040631
call fcn.10032a56
mov dword [eax], 0xd
call fcn.10032a5f
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.10039224
add esp, 0xc
mov eax, esi
pop edi
jmp 0x10040648
mov eax, ebx
pop esi
pop ebx
leave
ret
Function at 0x10040d28
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
push edi
mov dword [ebp - 0xc], ebx
je 0x10040d90
push 0x3d
push esi
call fcn.10040f1b
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 8], eax
je 0x10040d90
cmp esi, eax
je 0x10040d90
xor ecx, ecx
cmp byte [eax + 1], cl
mov eax, dword [0x10191dbc]
sete cl
cmp eax, dword [0x10191dc0]
mov dword [ebp - 4], ecx
jne 0x10040d76
mov edi, eax
call fcn.10040cc7
mov dword [0x10191dbc], eax
cmp eax, ebx
jne 0x10040dcf
cmp dword [ebp + 0xc], ebx
je 0x10040d98
cmp dword [0x10191dc4], ebx
je 0x10040d98
call fcn.10040786
test eax, eax
je 0x10040dcf
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x10040ed9
push 4
call fcn.1002e5f3
cmp eax, ebx
pop ecx
mov dword [0x10191dbc], eax
je 0x10040d90
mov dword [eax], ebx
cmp dword [0x10191dc4], ebx
jne 0x10040dcf
push 4
call fcn.1002e5f3
cmp eax, ebx
pop ecx
mov dword [0x10191dc4], eax
je 0x10040d90
mov dword [eax], ebx
mov edi, dword [ebp - 8]
mov ebx, dword [0x10191dbc]
sub edi, esi
push esi
call fcn.10040c7a
mov edi, eax
test edi, edi
pop ecx
jl 0x10040e2b
cmp dword [ebx], 0
je 0x10040e2b
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.1002e4db
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x10040e10
mov eax, dword [ebp + 8]
mov dword [esi], eax
mov esi, eax
jmp 0x10040e61
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x10040e07
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.1002f5e2
test eax, eax
mov esi, dword [ebp + 8]
pop ecx
pop ecx
je 0x10040e61
jmp 0x10040e5c
cmp dword [ebp - 4], 0
jne 0x10040ed2
test edi, edi
jge 0x10040e3b
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.1002f5e2
test eax, eax
pop ecx
pop ecx
je 0x10040d90
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x10191dbc], eax
cmp dword [ebp + 0xc], 0
je 0x10040ebd
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10040e6c
sub eax, edx
add eax, 2
push eax
call fcn.1002e5f3
mov edi, eax
test edi, edi
pop ecx
je 0x10040ebd
mov ecx, esi
sub eax, esi
mov dl, byte [ecx]
mov byte [eax + ecx], dl
inc ecx
test dl, dl
jne 0x10040e89
mov ecx, dword [ebp - 8]
add eax, ecx
and byte [eax], dl
mov ecx, dword [ebp - 4]
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x10040eb6
or dword [ebp - 0xc], 0xffffffff
push edi
call fcn.1002e4db
pop ecx
cmp dword [ebp - 4], 0
je 0x10040eca
push esi
call fcn.1002e4db
pop ecx
mov eax, dword [ebp - 0xc]
jmp 0x10040d93
push esi
call fcn.1002e4db
pop ecx
xor eax, eax
jmp 0x10040d93
Function at 0x10057c00
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi]
cmp eax, 0x9ac6cdd7
jne 0x10057c42
mov dword [esp + 8], eax
lea ecx, [esi + 2]
mov edx, 9
xor ax, word [ecx]
add ecx, 2
dec edx
jne 0x10057c1a
cmp ax, word [esi + 0x14]
jne 0x10057c42
mov si, word [esi + 0xe]
test si, si
jbe 0x10057c42
cmp si, 0x9ec
ja 0x10057c42
mov eax, 1
pop esi
ret 4
xor eax, eax
pop esi
ret 4

Function at 0x10059f70
Capabilities:
Resume thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x20c]
mov dword [esi], 0x10136f04
test eax, eax
je 0x10059fb0
push eax
mov byte [esi + 0x223], 0
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [esi + 0x20c]
push 0x1f4
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x204]
test eax, eax
je 0x10059fc3
push eax
call fcn.1002e4db
add esp, 4
mov eax, dword [esi + 0x208]
test eax, eax
je 0x10059fd6
push eax
call fcn.1002e4db
add esp, 4
mov ecx, dword [esi + 0x1fc]
lea eax, [esi + 0x1fc]
test ecx, ecx
je 0x10059fef
push eax
call fcn.10068ab0
add esp, 4
mov ecx, esi
mov dword [esi], sym.FirmwareModifier.dll_const_CxImage::vftable
call fcn.1004dbd0
mov ecx, esi
call fcn.1004db20
pop esi
ret