joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401800
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401819
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401854
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x401850
lea ebx, [ebx]
cmp esi, eax
jae 0x401854
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401840
cmp esi, eax
jb 0x40185a
pop esi
pop edi
xor eax, eax
pop ebx
ret
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x401870
Capabilities:
Get hostname
Get session user name

Disassembly:
sub esp, 0x208
mov eax, dword [0x437ae4]
xor eax, esp
mov dword [esp + 0x204], eax
push ebx
push edi
xor ebx, ebx
push 0xff
lea eax, [esp + 0x111]
push ebx
push eax
mov byte [esp + 0x118], bl
call fcn.004178b0
add esp, 0xc
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x110]
mov edi, 0x100
push edx
mov dword [esp + 0x10], edi
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
push 0xff
lea eax, [esp + 0x11]
push ebx
push eax
mov byte [esp + 0x18], bl
call fcn.004178b0
add esp, 0xc
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
movzx eax, byte [esp + 0x214]
mov edx, dword [esi]
lea ebx, [esp + 0xc]
lea edi, [esp + 0x10c]
call fcn.004063e0
mov ecx, dword [esp + 0x20c]
pop edi
pop ebx
xor ecx, esp
call fcn.0041579e
add esp, 0x208
ret
Function at 0x4019a0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x120
mov eax, dword [0x437ae4]
xor eax, esp
mov dword [esp + 0x11c], eax
push ebp
mov ebp, dword [esp + 0x128]
push esi
push 0x80000002
push str.GetRegistryStringValue_:_ParentKeyName_is_0x_p
push 4
mov esi, ecx
call fcn.00401920
add esp, 0xc
push esi
push str.GetRegistryStringValue_:_AccessKeyName_is__s
push 4
call fcn.00401920
add esp, 0xc
push edi
push str.GetRegistryStringValue_:_AccessValName_is__s
push 4
call fcn.00401920
add esp, 0xc
lea eax, [esp + 0xc]
push eax
push 0x20019
push 0
push esi
push 0x80000002
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
je 0x401a42
push esi
push str.GetRegistryStringValue_:_RegOpenKeyEx_failed.__ld__GetLastError___
push 2
call fcn.00401920
add esp, 0xc
mov eax, esi
pop esi
pop ebp
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.0041579e
add esp, 0x120
ret
push 0x107
lea ecx, [esp + 0x1d]
push 0
push ecx
mov dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0x24], 0
call fcn.004178b0
add esp, 0xc
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0
push edi
push edx
mov dword [esp + 0x2c], 0x108
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x401ac2
push esi
push str.GetRegistryStringValue_:_RegQueryValueEx_failed.__ld__GetLastError___
push 2
call fcn.00401920
add esp, 0xc
mov eax, esi
pop esi
pop ebp
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.0041579e
add esp, 0x120
ret
cmp dword [esp + 0x10], 1
je 0x401af4
push str.GetRegistryStringValue_:_RegQueryValueEx_failed._Data_type_not_supported.
push 2
call fcn.00401920
add esp, 8
mov eax, 0x57
pop esi
pop ebp
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.0041579e
add esp, 0x120
ret
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebp
call fcn.004013f0
mov edx, dword [ebp]
push edx
push str.GetRegistryStringValue_:_GetValue_is__s
push 4
call fcn.00401920
mov ecx, dword [esp + 0x130]
add esp, 0xc
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.0041579e
add esp, 0x120
ret

Function at 0x401b30
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
lea eax, [esp]
push eax
push 0x20019
push 0
push str.SOFTWAREFuji_XeroxInstNSU3
push 0x80000002
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401bb3
mov edx, dword [esp + 0x14]
push esi
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push 0
push ecx
push edx
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x24], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x401ba4
mov eax, esi
pop esi
add esp, 0xc
ret
mov eax, dword [esp + 8]
sub eax, 4
neg eax
sbb eax, eax
and eax, 0x57
pop esi
add esp, 0xc
ret
Function at 0x401ca0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x3c
push esi
push edi
mov edi, ecx
push edi
push str.ExecCmd_:_exeName__s_
push 4
mov esi, eax
call fcn.00401920
add esp, 0xc
push esi
push str.ExecCmd_:_param__s_
push 4
call fcn.00401920
add esp, 0xc
push 0x38
lea eax, [esp + 0x10]
push 0
push eax
call fcn.004178b0
add esp, 0xc
push str.ExecCmd_:_ShellExecuteEx_Start.
push 4
mov dword [esp + 0x10], 0x3c
mov dword [esp + 0x1c], str.open
mov dword [esp + 0x2c], 1
mov dword [esp + 0x14], 0x40
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], esi
call fcn.00401920
add esp, 8
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
mov edi, eax
jne 0x401d42
push edi
push str.ExecCmd_:_ShellExecuteEx_Error.__ld__GetLastError___
push 2
call fcn.00401920
add esp, 0xc
mov eax, edi
pop edi
pop esi
add esp, 0x3c
ret
mov edx, dword [esp + 0x40]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x40]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebx]
push edx
push str.ExecCmd_:_ShellExecuteEx_End._ExitCode_is__ld
push 4
call fcn.00401920
add esp, 0xc
pop edi
xor eax, eax
pop esi
add esp, 0x3c
ret

Function at 0x402270
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
push edi
mov edi, eax
xor eax, eax
push eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x1c]
push ecx
push ebx
call ebp
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
mov dword [esp + 0x18], eax
jne 0x4022c3
push eax
push str.CConfigData::ReadOneItem_:_ReadFile_1__failed.__ld__GetLastError___
push 2
call fcn.00401920
mov eax, dword [esp + 0x24]
add esp, 0xc
pop edi
pop esi
pop ebp
add esp, 0x10
ret
cmp dword [esp + 0x14], 4
je 0x4022e5
push str.CConfigData::ReadOneItem_:_ReadFile_1__failed._The_reading_size_is_abnormal.
push 2
call fcn.00401920
add esp, 8
mov eax, 0xd
pop edi
pop esi
pop ebp
add esp, 0x10
ret
mov edx, dword [esp + 0x10]
push 0xffffffffffffffff
push edx
mov ecx, edi
call fcn.00407e36
mov edx, dword [esp + 0x10]
mov eax, dword [edi + 4]
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
push eax
push ebx
call ebp
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
mov edi, eax
jne 0x40232d
push edi
push str.CConfigData::ReadOneItem_:_ReadFile_2__failed.__ld__GetLastError___
push 2
call fcn.00401920
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 0x10
ret
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
je 0x402352
push str.CConfigData::ReadOneItem_:_ReadFile_2__failed._The_reading_size_is_abnormal.
push 2
call fcn.00401920
add esp, 8
mov eax, 0xd
pop edi
pop esi
pop ebp
add esp, 0x10
ret
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10
ret
Function at 0x402870
Capabilities:
Delete file

Disassembly:
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
mov ebx, eax
mov eax, dword [ebx + 8]
lea esi, [ebx + 8]
push edi
push eax
call ebp
mov ecx, esi
call fcn.00401500
mov ecx, dword [ebx + 4]
lea edi, [ebx + 4]
push ecx
call ebp
mov ecx, edi
call fcn.00401500
mov ecx, ebx
call fcn.00401500
mov eax, dword [esi]
sub eax, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4028c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [edi]
sub edi, 0x10
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4028df
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov ebx, dword [ebx]
sub ebx, 0x10
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4028fd
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x403ca0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x124
mov eax, dword [0x437ae4]
xor eax, esp
mov dword [esp + 0x11c], eax
push 0x103
lea eax, [esp + 0x15]
push 0
push eax
mov byte [esp + 0x1c], 0
call fcn.004178b0
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x403cfc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.0041579e
add esp, 0x124
ret
xor eax, eax
lea edx, [esp]
push edx
mov word [esp + 4], 0
mov dword [esp + 6], eax
mov dword [esp + 0xa], eax
mov dword [esp + 0xe], eax
mov word [esp + 0x12], ax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0xc]
movzx ecx, word [esp + 0xa]
movzx edx, word [esp + 8]
push eax
movzx eax, word [esp + 0xa]
push ecx
movzx ecx, word [esp + 0xa]
push edx
movzx edx, word [esp + 0xc]
push eax
push ecx
push edx
lea eax, [esp + 0x28]
push eax
push str._sInstNSU3__04d_02d_02d_02d_02d_02d.log
push esi
call fcn.00402110
mov ecx, dword [esp + 0x140]
add esp, 0x24
xor ecx, esp
xor eax, eax
call fcn.0041579e
add esp, 0x124
ret
Function at 0x404de0
Capabilities:
Copy file
Delete file
Get common file path

Disassembly:
sub esp, 0x21c
mov eax, dword [0x437ae4]
xor eax, esp
mov dword [esp + 0x218], eax
push esi
push edi
mov esi, edx
mov edi, ecx
mov ecx, esi
call fcn.00401500
push 0x103
lea eax, [esp + 0x119]
push 0
push eax
mov byte [esp + 0x120], 0
call fcn.004178b0
add esp, 0xc
lea ecx, [esp + 0x114]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x404e68
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.backupLCIIniFile_:_GetTempPath_failed.__ld__GetLastError___
push 2
call fcn.00401920
add esp, 0xc
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.0041579e
add esp, 0x21c
ret
push 0x103
lea edx, [esp + 0x11]
push 0
push edx
mov byte [esp + 0x18], 0
call fcn.004178b0
add esp, 0xc
lea eax, [esp + 0xc]
push eax
push 0
push 0x430708
lea ecx, [esp + 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x404ed0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.backupLCIIniFile_:_GetTempFileName_failed.__ld__GetLastError___
push 2
call fcn.00401920
add esp, 0xc
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.0041579e
add esp, 0x21c
ret
mov edi, dword [edi]
push 0
lea edx, [esp + 0x10]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x404f20
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
push str.backupLCIIniFile_:_CopyFile_failed.__ld__GetLastError___
push 2
call fcn.00401920
add esp, 0xc
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.0041579e
add esp, 0x21c
ret
lea ecx, [esp + 0xc]
push ecx
mov ecx, esi
call fcn.004013f0
mov ecx, dword [esp + 0x220]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0041579e
add esp, 0x21c
ret
Function at 0x404f50
Capabilities:
Copy file
Delete file
Get common file path

Disassembly:
sub esp, 0x344
mov eax, dword [0x437ae4]
xor eax, esp
mov dword [esp + 0x340], eax
push ebx
push esi
lea eax, [esp + 8]
push eax
xor ebx, ebx
push str.ErrCodeOfCopyNSU3InstallPackage
mov esi, ecx
mov dword [esp + 0x10], ebx
call fcn.00401b30
add esp, 8
test eax, eax
jne 0x404f90
mov eax, dword [esp + 8]
cmp eax, ebx
jne 0x40514f
push ebx
push 0x42fd24
mov ecx, esi
call fcn.00401470
push 0x105
lea ecx, [esp + 0x139]
push ebx
push ecx
mov byte [esp + 0x140], bl
call fcn.004178b0
mov edx, dword [edi]
add esp, 0xc
push edx
lea eax, [esp + 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x103
lea ecx, [esp + 0x241]
push ebx
push ecx
mov byte [esp + 0x248], bl
call fcn.004178b0
add esp, 0xc
lea edx, [esp + 0x23c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x405030
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.copyNSU3InstallPackage_:_GetTempPath_failed.__ld__GetLastError___
push 2
call fcn.00401920
add esp, 0xc
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.0041579e
add esp, 0x344
ret
push 0x105
lea eax, [esp + 0x31]
push ebx
push eax
mov byte [esp + 0x38], bl
call fcn.004178b0
add esp, 0xc
lea ecx, [esp + 0x2c]
push ecx
push ebx
push 0x430708
lea edx, [esp + 0x248]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405095
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.copyNSU3InstallPackage_:_GetTempFileName_failed.__ld__GetLastError___
push 2
call fcn.00401920
add esp, 0xc
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.0041579e
add esp, 0x344
ret
lea eax, [esp + 0x2c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4050a0
sub eax, edx
push eax
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.00401470
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov word [esp + 0x28], ax
lea ecx, [esp + 0xc]
lea edx, [esp + 0x134]
lea eax, [esp + 0x2c]
push ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov word [esp + 0x20], 0xe14
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
mov esi, eax
cmp esi, ebx
je 0x40514d
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x138]
push eax
push esi
push str.copyNSU3InstallPackage_:__d__SHFileOperation_FO_COPY___s___s__
push 2
call fcn.00401920
add esp, 0x14
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.0041579e
add esp, 0x344
ret
xor eax, eax
mov ecx, dword [esp + 0x348]
pop esi
pop ebx
xor ecx, esp
call fcn.0041579e
add esp, 0x344
ret
Function at 0x405170
Capabilities:
Delete file

Disassembly:
sub esp, 0x130
mov eax, dword [0x437ae4]
xor eax, esp
mov dword [esp + 0x12c], eax
push esi
push 0x105
lea eax, [esp + 0x29]
push 0
push eax
mov esi, ecx
mov byte [esp + 0x30], 0
call fcn.004178b0
mov ecx, dword [esi]
add esp, 0xc
push ecx
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov word [esp + 0x20], ax
lea ecx, [esp + 4]
lea eax, [esp + 0x24]
push ecx
mov dword [esp + 8], 0
mov dword [esp + 0xc], 3
mov dword [esp + 0x10], eax
mov word [esp + 0x18], 0xe14
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
mov esi, eax
test esi, esi
je 0x40522a
lea edx, [esp + 0x24]
push edx
push esi
push str.deleteNSU3InstallPackage_:__d__SHFileOperation_FO_DELETE___s__
push 2
call fcn.00401920
add esp, 0x10
mov eax, esi
pop esi
mov ecx, dword [esp + 0x12c]
xor ecx, esp
call fcn.0041579e
add esp, 0x130
ret
mov ecx, dword [esp + 0x130]
pop esi
xor ecx, esp
xor eax, eax
call fcn.0041579e
add esp, 0x130
ret
Function at 0x405470
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x42b550
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
mov eax, dword [0x437ae4]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov esi, edx
push 3
call fcn.00405250
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x4054ca
cmp dword [0x43bb9c], ebx
jne 0x40567c
mov dword [0x43bb9c], eax
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x18
ret
push 0x42fd24
lea ecx, [esp + 0x10]
call fcn.00401590
mov dword [esp + 0x20], ebx
cmp byte [0x43bb8e], bl
je 0x405518
cmp byte [0x43bb8f], bl
je 0x405506
mov eax, dword [0x43bb90]
push eax
lea ecx, [esp + 0x10]
push str._s__v__qn__Lv___s__REBOOT_R__
push ecx
call fcn.00402110
add esp, 0xc
jmp 0x405518
lea edx, [esp + 0xc]
push str._s__v__qn_REBOOT_R__
push edx
call fcn.00402110
add esp, 8
lea eax, [esp + 0x10]
push eax
push str.ErrCodeOfExecNSU3Installer
mov dword [esp + 0x18], ebx
call fcn.00401b30
add esp, 8
cmp eax, ebx
jne 0x40558a
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40558a
cmp dword [0x43bb9c], ebx
jne 0x40554c
mov dword [0x43bb9c], 0xffff8ac9
mov esi, eax
mov dword [esp + 0x20], 0xffffffff
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405576
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x18
ret
mov ecx, dword [esi]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x14], ebx
lea ebx, [esp + 0x14]
call fcn.00401ca0
mov esi, eax
test esi, esi
je 0x4055f2
cmp dword [0x43bb9c], 0
jne 0x4055b6
mov dword [0x43bb9c], 0xffff8ac9
mov dword [esp + 0x20], 0xffffffff
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405576
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x14]
test eax, eax
je 0x405616
cmp dword [0x43bb9c], 0
jne 0x40554c
mov dword [0x43bb9c], 0xffff8ac8
jmp 0x40554c
mov ecx, dword [edi]
cmp dword [ecx - 0xc], 0
je 0x405652
lea ecx, [esp + 0x10]
call fcn.004020e0
lea ebx, [esp + 0x10]
mov byte [esp + 0x20], 1
call fcn.00404d90
test eax, eax
jne 0x405649
mov edx, dword [esp + 0x10]
mov eax, dword [edi]
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0x10]
call fcn.00401570
mov dword [esp + 0x20], 0xffffffff
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40567a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x18
ret
Function at 0x405690
Capabilities:
Get file attributes
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x42b511
mov eax, dword fs:[0]
push eax
sub esp, 0x190
push ebx
push ebp
push esi
push edi
mov eax, dword [0x437ae4]
xor eax, esp
push eax
lea eax, [esp + 0x1a4]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [0x43bb8d], 0
jne 0x4058e8
or ebp, 0xffffffff
cmp byte [0x43bb8c], 0
jne 0x405751
cmp byte [0x43bb8e], 0
jne 0x4058e8
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
mov eax, dword [esi]
push eax
push ebx
push str.installNSU2_:__ld__GetFileAttributes__s__
push 4
call fcn.00401920
add esp, 0x10
cmp ebx, ebp
je 0x4058e8
test bl, 0x10
jne 0x4058e8
lea ecx, [esp + 0x2c]
push ecx
call fcn.00402370
xor ebx, ebx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1ac], ebx
call fcn.0040dfa1
cmp eax, 1
mov dword [esp + 0x1ac], ebp
lea ecx, [esp + 0x2c]
je 0x40574a
call fcn.00402430
jmp 0x4058e8
call fcn.00402430
jmp 0x405753
xor ebx, ebx
mov ecx, dword [esp + 0x1b4]
push 2
mov edx, esi
call fcn.00405250
add esp, 4
cmp eax, ebx
je 0x405780
cmp dword [0x43bb9c], ebx
jne 0x4058ea
mov dword [0x43bb9c], eax
jmp 0x4058ea
lea edx, [esp + 0x18]
push edx
call fcn.00402800
push 0x4301e8
lea eax, [esp + 0x18]
push 0x43bba0
push eax
mov dword [esp + 0x1b8], 1
call fcn.004059c0
add esp, 0xc
mov byte [esp + 0x1ac], 2
movzx edx, byte [0x43bb8e]
lea ecx, [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x20]
call fcn.00402910
mov edi, eax
cmp edi, ebx
je 0x405817
cmp dword [0x43bb9c], ebx
jne 0x4057e2
mov dword [0x43bb9c], 0xffff8ac4
mov byte [esp + 0x1ac], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x405807
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x18]
call fcn.00402870
mov eax, edi
jmp 0x4058ea
lea ecx, [esp + 0x28]
push ecx
push str.ErrCodeOfExecNSU2Installer
mov dword [esp + 0x30], ebx
call fcn.00401b30
add esp, 8
test eax, eax
jne 0x405866
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x405866
cmp dword [0x43bb9c], ebx
jne 0x40584b
mov dword [0x43bb9c], 0xffff8ac5
mov esi, eax
lea ecx, [esp + 0x14]
call fcn.00401570
lea eax, [esp + 0x18]
call fcn.00402870
mov eax, esi
jmp 0x4058ea
mov ecx, dword [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], ebx
lea ebx, [esp + 0x24]
call fcn.00401ca0
mov esi, eax
test esi, esi
je 0x405894
cmp dword [0x43bb9c], 0
jne 0x40584d
mov dword [0x43bb9c], 0xffff8ac5
jmp 0x40584d
mov esi, dword [esp + 0x24]
test esi, esi
je 0x4058b1
cmp dword [0x43bb9c], 0
jne 0x40584d
mov dword [0x43bb9c], 0xffff8ac3
jmp 0x40584d
cmp byte [0x43bb8e], 0
je 0x4058d6
mov edx, dword [esp + 0x20]
push edx
push ebp
push str.ResultCode
push str.ResponseResult
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov esi, eax
test esi, esi
jne 0x40589c
lea ecx, [esp + 0x14]
call fcn.00401570
lea eax, [esp + 0x18]
call fcn.00402870
xor eax, eax
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x19c
ret
Function at 0x4070f7
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x437ae4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0x800
push ebx
push esi
mov esi, ecx
mov ebx, edx
lea eax, [ebp - 0x11c]
jne 0x407137
push 0x42c938
push 4
push eax
call fcn.00417807
push eax
call fcn.00405fe0
add esp, 0x10
jmp 0x407149
push 4
push eax
push 3
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x4071b7
push edi
call fcn.004174a7
mov edi, dword [eax]
call fcn.004174a7
and dword [eax], 0
lea eax, [ebp - 0x11c]
push eax
push ebx
push esi
push 0x111
mov esi, 0x112
lea eax, [ebp - 0x118]
push esi
push eax
call fcn.00417888
add esp, 0x18
mov ebx, eax
call fcn.004174a7
cmp dword [eax], 0
je 0x407197
call fcn.004174a7
push dword [eax]
call fcn.00406927
pop ecx
jmp 0x40719e
call fcn.004174a7
mov dword [eax], edi
cmp ebx, 0xffffffff
pop edi
je 0x4071b7
cmp ebx, esi
jae 0x4071b7
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x4071b9
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0041579e
leave
ret
Function at 0x40d09f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebx, ebx
cmp dword [esp + 0x14], edi
mov ebp, ecx
je 0x40d0e2
call fcn.0040ed99
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40d0e2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40d0fd
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
push ebx
mov ecx, ebp
call fcn.0040cc56
test ebx, ebx
mov esi, eax
je 0x40d0fb
test edi, edi
je 0x40d0fb
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 4