joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40b0d0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x41e740]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x40b112
call edi
mov esi, eax
test esi, esi
je 0x40b0fc
mov eax, 1
jmp 0x40b10d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40b21f
mov eax, 2
mov dword [0x41e740], eax
cmp eax, 1
jne 0x40b1b2
test esi, esi
jne 0x40b12b
call edi
mov esi, eax
test esi, esi
je 0x40b21f
cmp word [esi], 0
mov eax, esi
je 0x40b145
add eax, 2
cmp word [eax], 0
jne 0x40b133
add eax, 2
cmp word [eax], 0
jne 0x40b133
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x40b1a4
push edi
call fcn.00407820
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40b1a4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40b196
push ebx
call fcn.004078d0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40b21f
test ebx, ebx
jne 0x40b1c3
call ebp
mov ebx, eax
test ebx, ebx
je 0x40b21f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40b1db
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40b1cb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40b1cb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00407820
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40b1fd
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40b680
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x41b108
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40b6a4
add eax, 8
inc ebp
cmp eax, 0x41b198
jb 0x40b695
cmp ecx, dword [ebp*8 + 0x41b108]
jne 0x40b84b
mov eax, dword [0x41e48c]
cmp eax, 1
je 0x40b80d
test eax, eax
jne 0x40b6d0
cmp dword [0x41ac88], 1
je 0x40b80d
cmp ecx, 0xfc
je 0x40b84b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40b70b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40b754
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4181dc
add ebx, ecx
push ebx
call fcn.004087e0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4181d4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x41b10c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0040f880
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x41fbc0]
test eax, eax
je 0x40b81e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40b828
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x41b10c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x40c420
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x41fcc0]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x40c5cd
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x41fbc0]
lea edi, [ecx*4 + 0x41fbc0]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x40c5cd
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40c48e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x40c49f
push 2
push ebp
push eax
call fcn.0040e4a0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40c5fe
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40c549
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40c4fa
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40c4e7
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40c4ca
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c5ef
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40c545
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40c4c6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40c5be
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40c592
cmp eax, 5
jne 0x40c57b
mov dword [0x41e5e0], eax
mov dword [0x41e5dc], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.0040c770
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x40c5b2
cmp byte [ebp], 0x1a
jne 0x40c5b2
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x41e5dc], 0x1c
jmp 0x40c5d7
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x41e5dc], 9
pop edi
pop esi
pop ebp
mov dword [0x41e5e0], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40c545
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c62f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40c549
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40c549
Function at 0x40f540
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40f563
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040c770
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x40f586
test byte [esp + 8], 2
je 0x40f586
mov dword [0x41e5dc], 0xd
mov dword [0x41e5e0], 5
or eax, 0xffffffff
ret
xor eax, eax
ret

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

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x410143
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040c770
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x410166
test byte [esp + 8], 2
je 0x410166
mov dword [0x41e5dc], 0xd
mov dword [0x41e5e0], 5
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x412880
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x412a3e
push 0x3d
push edi
call fcn.00414d60
mov esi, eax
add esp, 8
test esi, esi
je 0x412a3e
cmp edi, esi
je 0x412a3e
mov dl, byte [esi + 1]
mov ecx, dword [0x41e608]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x41e604]
cmp eax, ecx
jne 0x4128d7
push eax
call fcn.00412b10
add esp, 4
mov dword [0x41e604], eax
test eax, eax
jne 0x412952
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4128fe
mov eax, dword [0x41e60c]
test eax, eax
je 0x4128fe
call fcn.0040da00
test eax, eax
je 0x41294d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x41290a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00407820
add esp, 4
mov dword [0x41e604], eax
test eax, eax
je 0x412a3e
mov dword [eax], 0
mov eax, dword [0x41e60c]
test eax, eax
jne 0x41294d
push 4
call fcn.00407820
add esp, 4
mov dword [0x41e60c], eax
test eax, eax
je 0x412a3e
mov dword [eax], 0
mov eax, dword [0x41e604]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.00412a90
mov esi, eax
add esp, 8
test esi, esi
jl 0x412a4f
cmp dword [ebx], 0
je 0x412a4f
test ebp, ebp
je 0x412a47
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.004078d0
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x4129a9
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x412998
lea eax, [esi*4]
push eax
push ebx
call fcn.0040a350
add esp, 8
test eax, eax
je 0x4129c3
mov dword [0x41e604], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x412a36
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00407820
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x412a36
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.004078d0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x4129c7
test ebp, ebp
jne 0x412a36
test esi, esi
jge 0x412a59
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.0040a350
add esp, 8
test eax, eax
je 0x412a3e
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x41e604], eax
jmp 0x4129c7
Function at 0x415e10
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.00417450
mov eax, dword [0x41fcc0]
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
xor ebp, ebp
push esi
cmp ebx, eax
push edi
jae 0x415f72
mov eax, ebx
mov ecx, ebx
sar eax, 5
and ecx, 0x1f
mov edx, dword [eax*4 + 0x41fbc0]
test byte [edx + ecx*8 + 4], 1
je 0x415f72
push 1
push ebp
push ebx
call fcn.0040e4a0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x415f7c
push 2
push ebp
push ebx
call fcn.0040e4a0
add esp, 0xc
cmp eax, 0xffffffff
je 0x415f7c
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x415f18
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.00408d10
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x415ebf
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.0040c420
add esp, 0xc
cmp eax, 0xffffffff
je 0x415edb
sub esi, eax
test esi, esi
jle 0x415ef1
jmp 0x415eb0
cmp dword [0x41e5e0], 5
jne 0x415eee
mov dword [0x41e5dc], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.00408d10
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.0040e4a0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x415f59
push 0
push ecx
push ebx
call fcn.0040e4a0
add esp, 0xc
push ebx
call fcn.0040c9f0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x415f59
mov dword [0x41e5dc], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x41e5e0], eax
push 0
push edi
push ebx
call fcn.0040e4a0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
mov dword [0x41e5dc], 9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x416190
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x41e944]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push edi
test eax, eax
jne 0x4161d8
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x4161b8
mov eax, 1
jmp 0x4161d3
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x4162a9
mov eax, 2
mov dword [0x41e944], eax
cmp eax, 1
jne 0x4161f8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x4162bb
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x416213
mov ecx, dword [0x41e760]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
push 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov esi, eax
test esi, esi
jne 0x416232
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.00407820
mov edi, eax
add esp, 4
test edi, edi
jne 0x416246
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
push edi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x4162a0
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x416284
mov edx, dword [esp + 0x24]
push eax
push eax
push 0xffffffffffffffff
push edi
push 1
push edx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
test esi, esi
je 0x4162a0
push edi
call fcn.004078d0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x20]
push eax
push 0xffffffffffffffff
push edi
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
test esi, esi
jne 0x4162b0
push edi
call fcn.004078d0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call fcn.004078d0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4162c0
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x41e948]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x416308
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x4162e8
mov eax, 2
jmp 0x416303
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x4163e8
mov eax, 1
mov dword [0x41e948], eax
cmp eax, 2
jne 0x416328
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 1
jne 0x4163fa
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x416343
mov ecx, dword [0x41e760]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
push 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov edi, eax
test edi, edi
jne 0x416362
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call fcn.00407820
mov esi, eax
add esp, 4
test esi, esi
jne 0x416379
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x4163df
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x4163c0
mov eax, dword [esp + 0x2c]
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x220
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x4163df
push esi
call fcn.004078d0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push 0xffffffffffffffff
push esi
push 0x220
push edx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jne 0x4163ef
push esi
call fcn.004078d0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.004078d0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x417150
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
test ebp, ebp
push edi
je 0x41730a
push 0x3d
push ebp
call fcn.00409380
mov esi, eax
add esp, 8
test esi, esi
je 0x41730a
cmp ebp, esi
je 0x41730a
xor eax, eax
mov ecx, dword [0x41e610]
cmp word [esi + 2], ax
sete al
mov edi, eax
mov eax, dword [0x41e60c]
cmp eax, ecx
mov dword [esp + 0x10], edi
jne 0x4171aa
push eax
call fcn.004173e0
add esp, 4
mov dword [0x41e60c], eax
test eax, eax
jne 0x41722a
mov ecx, dword [esp + 0x1c]
test ecx, ecx
mov ecx, dword [0x41e604]
je 0x4171d2
test ecx, ecx
je 0x4171d2
call fcn.00415a40
test eax, eax
je 0x417225
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test edi, edi
je 0x4171de
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ecx, ecx
jne 0x417204
push 4
call fcn.00407820
add esp, 4
mov dword [0x41e604], eax
test eax, eax
je 0x41730a
mov dword [eax], 0
mov eax, dword [0x41e60c]
test eax, eax
jne 0x41722a
push 4
call fcn.00407820
add esp, 4
mov dword [0x41e60c], eax
test eax, eax
je 0x41730a
mov dword [eax], 0
mov eax, dword [0x41e60c]
mov ecx, dword [esp + 0x18]
sub esi, ebp
mov ebp, esi
mov ebx, eax
sar ebp, 1
push ebp
push ecx
call fcn.00417360
mov esi, eax
add esp, 8
test esi, esi
jl 0x41731c
cmp dword [ebx], 0
je 0x41731c
test edi, edi
je 0x417313
mov edx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push edx
call fcn.004078d0
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x417283
mov eax, edi
mov ecx, dword [eax + 4]
add eax, 4
mov dword [edi], ecx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x417272
lea edx, [esi*4]
push edx
push ebx
call fcn.0040a350
add esp, 8
test eax, eax
je 0x41729d
mov dword [0x41e60c], eax
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x417302
mov eax, dword [esp + 0x18]
push eax
call fcn.004085d0
add esp, 4
lea ecx, [eax + eax + 4]
push ecx
call fcn.00407820
mov esi, eax
add esp, 4
test esi, esi
je 0x417302
mov edx, dword [esp + 0x18]
push edx
push esi
call fcn.00407b10
add esp, 8
lea eax, [esi + ebp*2 + 2]
neg edi
sbb edi, edi
mov word [esi + ebp*2], 0
not edi
and edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
call fcn.004078d0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x18]
mov dword [ebx + esi*4], eax
jmp 0x4172a1
test edi, edi
jne 0x417302
test esi, esi
jge 0x417326
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.0040a350
add esp, 8
test eax, eax
je 0x41730a
mov edx, dword [esp + 0x18]
mov dword [eax + esi*4], edx
mov dword [eax + esi*4 + 4], 0
mov dword [0x41e60c], eax
jmp 0x4172a1
Function at 0x4014d0
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x418ab1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x15c
mov eax, dword [0x4202c0]
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], eax
xor ebx, ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x174], ebx
call fcn.00411ce3
mov esi, dword [esp + 0x17c]
push ebx
push ebx
push esi
lea ecx, [esp + 0x20]
mov byte [esp + 0x180], 1
call fcn.00411df5
lea ecx, [esp + 0x14]
call fcn.004120ef
cmp eax, 0x7fff
jbe 0x401581
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 0x6c]
push 0x100
push ecx
push 6
push ebx
call esi
lea edx, [esp + 0x2c]
push 0x40
push edx
push 3
push ebx
call esi
lea ecx, [esp + 0x14]
call fcn.00412010
lea ecx, [esp + 0x14]
mov byte [esp + 0x174], bl
call fcn.00411d38
mov dword [esp + 0x174], 0xffffffff
jmp 0x40161e
lea ecx, [esp + 0x14]
call fcn.00412010
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or ebp, 0xffffffff
cmp eax, ebp
je 0x401607
push 0x20
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x28]
push esi
push eax
mov ecx, edi
call fcn.00401690
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x178], 2
call fcn.00411ae4
lea ecx, [esp + 0x28]
mov byte [esp + 0x174], 1
call fcn.004119f7
mov ecx, dword [esp + 0x10]
push 0x423824
push ecx
call fcn.004036c7
add esp, 8
test eax, eax
je 0x401607
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.0041176c
mov ecx, edi
call fcn.00401840
cmp eax, ebx
je 0x401607
cmp eax, ebp
jne 0x40162e
lea ecx, [esp + 0x14]
mov byte [esp + 0x174], bl
call fcn.00411d38
mov dword [esp + 0x174], ebp
lea ecx, [esp + 0x10]
call fcn.004119f7
mov eax, 0xfffffffb
jmp 0x401671
push eax
mov eax, dword [esp + 0x184]
push eax
push ecx
lea edx, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
call fcn.0041176c
mov ecx, edi
call fcn.00401920
lea ecx, [esp + 0x14]
mov byte [esp + 0x174], bl
call fcn.00411d38
lea ecx, [esp + 0x10]
mov dword [esp + 0x174], ebp
call fcn.004119f7
xor eax, eax
mov ecx, dword [esp + 0x16c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x168
ret 8