joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4fcaf0
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x400
shl eax, 8
push esi
push edi
lea esi, [eax + 0xe99388]
push str.save.dat
push esi
lea ecx, [esp + 0x10]
push 0x5190ac
push ecx
call fcn.0050543d
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x10
lea edx, [esp + 8]
push edx
call edi
push str.mail.dat
push esi
lea eax, [esp + 0x10]
push 0x5190ac
push eax
call fcn.0050543d
add esp, 0x10
lea ecx, [esp + 8]
push ecx
call edi
push str.guildmail.dat
push esi
lea edx, [esp + 0x10]
push 0x5190ac
push edx
call fcn.0050543d
add esp, 0x10
lea eax, [esp + 8]
push eax
call edi
pop edi
pop esi
add esp, 0x400
ret

Function at 0x4fdef8
Capabilities:
Clear file content
Encode data using xor
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x513044
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
mov dword [esp + 4], esi
lea ecx, [esi + 0x11bc]
mov dword [esp + 0x14], 1
call fcn.00503a10
lea ecx, [esi + 0x1064]
mov byte [esp + 0x14], 0
call fcn.005033c0
add esi, 0x28
mov dword [esp + 4], esi
mov eax, dword [esi]
mov dword [esp + 0x14], 2
cmp eax, 0xffffffff
je 0x4fe06f
push ebp
push edi
lea edi, [esi + 0x101c]
push edi
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [esi + 0x1034]
test eax, eax
je 0x4fdf64
mov ecx, dword [esi + 0x1038]
cmp ecx, eax
mov eax, 0x54f3d8
ja 0x4fdf69
mov eax, 0x5550b8
push eax
xor eax, eax
mov ax, word [esi + 0x102a]
xor ecx, ecx
mov cx, word [esi + 0x1028]
push eax
xor edx, edx
xor eax, eax
mov dx, word [esi + 0x1026]
mov ax, word [esi + 0x1024]
push ecx
push edx
xor ecx, ecx
push eax
mov cx, word [esi + 0x1022]
xor edx, edx
mov dx, word [esi + 0x101e]
xor eax, eax
mov ax, word [edi]
push ecx
push edx
push eax
push 0x54f380
lea ebp, [esi + 0x1c]
call fcn.00504960
add esp, 4
push eax
push ebp
call fcn.0050543d
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
add esp, 0x28
repne scasb al, byte es:[edi]
mov eax, dword [esi + 0x1030]
not ecx
dec ecx
test eax, eax
je 0x4fe007
test ecx, ecx
jle 0x4fe037
mov edi, 0xffffffe4
mov eax, ebp
sub edi, esi
mov edx, dword [esi + 0x1030]
add edx, 2
mov dword [esi + 0x1030], edx
add dl, 0x43
xor byte [eax], dl
inc eax
lea edx, [edi + eax]
cmp edx, ecx
jl 0x4fdfe9
jmp 0x4fe037
test ecx, ecx
jle 0x4fe037
mov edi, 0xffffffe4
push ebx
mov eax, ebp
sub edi, esi
mov edx, dword [esi + 0x102c]
lea edx, [edx + edx*2 + 1]
mov dword [esi + 0x102c], edx
mov bl, byte [eax]
add dl, 0x65
xor bl, dl
mov byte [eax], bl
inc eax
lea edx, [eax + edi]
cmp edx, ecx
jl 0x4fe015
pop ebx
cmp dword [esi + 0x1034], 0x3e7
je 0x4fe055
lea eax, [esp + 0x10]
push 0
push eax
push ecx
mov ecx, dword [esi]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi], 0xffffffff
pop ebp
add esi, 4
push esi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x4ffbe0
Capabilities:
Check for software breakpoints
Encode data using xor
Write file on windows

Disassembly:
mov eax, 0x1008
call fcn.005067e0
push ebx
push esi
mov esi, dword [esp + 0x1014]
cmp dword [esi], 0xffffffff
je 0x4ffd65
mov eax, dword [esi + 0x1034]
test eax, eax
je 0x4ffc27
mov ecx, dword [esp + 0x1018]
cmp byte [ecx], 0x21
je 0x4ffc27
mov ecx, dword [esi + 0x1038]
cmp ecx, eax
ja 0x4ffd65
inc ecx
mov dword [esi + 0x1038], ecx
lea ebx, [esi + 4]
push ebx
mov dword [esp + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x1018]
lea edx, [esp + 0x101c]
push edx
lea ecx, [esp + 0x14]
push eax
push ecx
call fcn.00508309
add esp, 0xc
lea edx, [esi + 0x101c]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, fcn.0050543d
cmp byte [eax], 0xcc
je 0x4ffd5e
mov ecx, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp byte [ecx], 0xcc
je 0x4ffd5e
xor eax, eax
push ebp
mov ax, word [esi + 0x102a]
lea edx, [esp + 0x14]
push edi
push edx
xor ecx, ecx
push eax
mov cx, word [esi + 0x1028]
xor edx, edx
mov dx, word [esi + 0x1026]
xor eax, eax
mov ax, word [esi + 0x1024]
push ecx
push edx
push eax
push 0x54fadc
lea ebp, [esi + 0x1c]
call fcn.00504960
add esp, 4
push eax
push ebp
call fcn.0050543d
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
add esp, 0x1c
repne scasb al, byte es:[edi]
mov eax, dword [esi + 0x1030]
not ecx
dec ecx
test eax, eax
je 0x4ffd0e
test ecx, ecx
jle 0x4ffd38
mov edi, 0xffffffe4
mov eax, ebp
sub edi, esi
mov edx, 2
mov ebx, dword [esi + 0x1030]
add ebx, edx
mov dword [esi + 0x1030], ebx
add bl, 0x43
xor byte [eax], bl
inc eax
lea ebx, [edi + eax]
cmp ebx, ecx
jl 0x4ffced
mov ebx, dword [esp + 0x10]
jmp 0x4ffd38
test ecx, ecx
jle 0x4ffd38
mov edi, 0xffffffe4
mov eax, ebp
sub edi, esi
mov edx, dword [esi + 0x102c]
lea edx, [edx + edx*2 + 1]
mov dword [esi + 0x102c], edx
add dl, 0x65
xor byte [eax], dl
inc eax
lea edx, [eax + edi]
cmp edx, ecx
jl 0x4ffd1b
lea eax, [esp + 0x14]
push 0
push eax
push ecx
mov ecx, dword [esi]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop ebp
pop esi
mov al, 1
pop ebx
add esp, 0x1008
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
xor al, al
pop ebx
add esp, 0x1008
ret
Function at 0x5002f0
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
mov al, byte [esi + 0x1c]
test al, al
jne 0x5002fe
mov al, 1
pop esi
ret
push edi
push 0x54fd68
lea edi, [esi + 0x28]
call fcn.005049d0
add esp, 4
push eax
push edi
call fcn.004ffbe0
mov ecx, dword [esi + 0x1204]
lea eax, [esi + 0x1230]
push eax
push ecx
call dword [esi + 0x1288]
mov eax, dword [esi + 0x14]
add esp, 0x10
test eax, eax
mov byte [esi + 0x1c], 0
je 0x50033f
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [esi + 0x122c]
push 0x7d0
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x50037e
push 0x54fd50
call fcn.005049d0
add esp, 4
push eax
push edi
call fcn.004ffbe0
mov eax, dword [esi + 0x122c]
add esp, 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [esi + 0x122c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x1228]
test eax, eax
je 0x50039c
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x54fd3c
mov dword [esi + 0x1284], 0
mov dword [esi + 0x1288], 0
call fcn.005049d0
add esp, 4
push eax
push edi
call fcn.004ffbe0
add esp, 8
mov al, 1
pop edi
pop esi
ret

Function at 0x5004c0
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x1c]
push 1
push ecx
mov dword [esp + 0x18], 0xc
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 0
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x50050b
push edi
push edi
lea edx, [esp + 0x24]
push 1
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x50050b
lea edi, [esp + 0x10]
push 0x54fdc0
call fcn.005049d0
mov ebx, dword [sym.imp.KERNEL32.dll_CreateMutexA]
add esp, 4
push eax
push 0
push edi
call ebx
mov esi, eax
test esi, esi
jne 0x500573
push 0x54fdb4
call fcn.005049d0
add esp, 4
push eax
push esi
push edi
call ebx
mov esi, eax
test esi, esi
jne 0x500573
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
push eax
push 0x54fd90
call fcn.005049d0
add esp, 4
add ebp, 0x28
push eax
push ebp
call fcn.004ffbe0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x500593
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 4
mov eax, dword [esp + 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x5005b9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret 4
Function at 0x5005d0
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x1c]
push 1
push ecx
mov dword [esp + 0x18], 0xc
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 0
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x50061b
push edi
push edi
lea edx, [esp + 0x24]
push 1
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x50061b
lea edi, [esp + 0x10]
push 0x54fbd0
call fcn.005049d0
mov ebx, dword [sym.imp.KERNEL32.dll_CreateMutexA]
add esp, 4
push eax
push 0
push edi
call ebx
mov esi, eax
test esi, esi
jne 0x500683
push 0x54fbc4
call fcn.005049d0
add esp, 4
push eax
push esi
push edi
call ebx
mov esi, eax
test esi, esi
jne 0x500683
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
push eax
push 0x54fdf0
call fcn.005049d0
add esp, 4
add ebp, 0x28
push eax
push ebp
call fcn.004ffbe0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x5006d0
mov eax, dword [esp + 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x5006d0
push 0x54fdd4
call fcn.005049d0
add esp, 4
add ebp, 0x28
push eax
push ebp
call fcn.004ffbe0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret 4
Function at 0x501960
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x51307b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x418
push ebx
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
call fcn.00504e30
mov ebx, dword [esp + 0x430]
lea eax, [esp + 8]
push eax
push ebx
lea ecx, [esp + 0x24]
mov dword [esp + 0x430], 0
call fcn.00504e70
test al, al
jne 0x501a02
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov eax, dword [0xec6350]
test eax, eax
je 0x501a02
push esi
mov esi, dword [esp + 0x420]
call edi
push eax
push esi
push ebx
push 0x5504e0
call fcn.005049d0
mov ecx, dword [0xec6350]
add esp, 4
add ecx, 0x28
push eax
push ecx
call fcn.004ffbe0
add esp, 0x14
pop esi
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push edx
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x5504ac
call fcn.005049d0
add esp, 4
push eax
push reloc.DSOUND.dll_DirectSoundCreate
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
pop edi
pop ebx
test eax, eax
jne 0x501aa9
cmp dword [esp + 0xc], 2
jne 0x501a69
mov eax, dword [esp + 0x42c]
lea ecx, [esp + 0x10]
lea edx, [esp + 4]
push ecx
push edx
push 0
push 0
push eax
call fcn.005049d0
mov ecx, dword [esp + 0x1c]
add esp, 4
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp]
mov ecx, dword [esp + 4]
cmp eax, ecx
je 0x501ad8
mov edx, dword [0xec6350]
test edx, edx
je 0x501b0f
push ecx
push eax
push 0x550494
call fcn.005049d0
add esp, 4
push eax
mov eax, dword [0xec6350]
add eax, 0x28
push eax
jmp 0x501b07
mov ecx, dword [0xec6350]
test ecx, ecx
je 0x501ad4
push eax
push 0x55047c
call fcn.005049d0
mov ecx, dword [0xec6350]
add esp, 4
add ecx, 0x28
push eax
push ecx
call fcn.004ffbe0
add esp, 0xc
mov eax, dword [esp]
mov ecx, dword [esp + 0x430]
cmp eax, ecx
je 0x501b3a
mov edx, dword [0xec6350]
test edx, edx
je 0x501b0f
push ecx
push eax
push 0x550464
call fcn.005049d0
mov edx, dword [0xec6350]
add esp, 4
add edx, 0x28
push eax
push edx
call fcn.004ffbe0
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0x420], 0xffffffff
call fcn.00430c80
xor al, al
mov ecx, dword [esp + 0x418]
mov dword fs:[0], ecx
add esp, 0x424
ret
lea ecx, [esp + 0x14]
mov dword [esp + 0x420], 0xffffffff
call fcn.00430c80
mov ecx, dword [esp + 0x418]
mov al, 1
mov dword fs:[0], ecx
add esp, 0x424
ret
Function at 0x502b20
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
sub esp, 0x43c
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push esi
push edi
lea eax, [esp + 0x13c]
xor esi, esi
push 0x104
push eax
push esi
mov byte [esp + 0x1b], 0
call ebp
push 0x5507d0
call fcn.005049d0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
je 0x502b87
push 0x5507b8
call fcn.005049d0
add esp, 4
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
jne 0x502b87
pop edi
pop esi
xor al, al
pop ebp
add esp, 0x43c
ret
lea ecx, [esp + 0x13c]
push 0x104
push ecx
push 0
call ebp
lea edx, [esp + 0x240]
push 0x104
lea eax, [esp + 0x140]
push edx
push eax
call esi
lea ecx, [esp + 0x240]
push 0x5c
push ecx
call fcn.005081b7
add esp, 8
test eax, eax
je 0x502bc8
mov byte [eax], 0
lea edx, [esp + 0x10]
push edx
push 3
push 0
push 0x550770
call fcn.005049d0
add esp, 4
push eax
push reloc.DSOUND.dll_DirectSoundCreate
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x502d2d
push ebx
mov edx, dword [esp + 0x14]
push eax
push eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
push eax
push eax
lea eax, [esp + 0x28]
lea ecx, [esp + 0x4c]
push eax
push ecx
push 0
push edx
mov dword [esp + 0x38], 0x104
mov ebp, 1
call ebx
cmp eax, 0x103
je 0x502d21
test eax, eax
jne 0x502cf1
lea edi, [esp + 0x3c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x348]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x5c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34c]
push ecx
call fcn.005081b7
add esp, 8
test eax, eax
je 0x502c6f
mov byte [eax], 0
lea edx, [esp + 0x244]
lea eax, [esp + 0x348]
push edx
push eax
call fcn.00508022
add esp, 8
test eax, eax
jne 0x502cf1
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
push eax
lea eax, [esp + 0x4c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x502cf1
mov eax, dword [0xec6350]
test eax, eax
je 0x502cd8
lea edx, [esp + 0x1c]
push edx
push 0x550758
call fcn.005049d0
add esp, 4
push eax
mov eax, dword [0xec6350]
add eax, 0x28
push eax
call fcn.004ffbe0
add esp, 0xc
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x3c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x502cf1
mov byte [esp + 0x13], 1
push 0
push 0
push 0
lea ecx, [esp + 0x24]
push 0
lea edx, [esp + 0x4c]
mov eax, ebp
push ecx
push edx
push eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x34], 0x104
push eax
inc ebp
call ebx
cmp eax, 0x103
jne 0x502c28
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebp
add esp, 0x43c
ret
Function at 0x502d40
Capabilities:
Set registry value

Disassembly:
push ecx
lea eax, [esp]
push ebx
push eax
push 0xf003f
push 0
push 0x5507fc
xor bl, bl
call fcn.005049d0
add esp, 4
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x502da1
lea ecx, [esp + 0xc]
push 4
push ecx
push 4
push eax
push 0x5507e4
call fcn.005049d0
mov edx, dword [esp + 0x18]
add esp, 4
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x502d96
mov bl, 1
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
pop ebx
pop ecx
ret

Function at 0x502db0
Capabilities:
Check mutex on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
push 0x550870
call fcn.005049d0
mov esi, dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
add esp, 4
push eax
push 0
push 0xf001f
call esi
mov edi, eax
test edi, edi
mov dword [esp + 0x10], edi
jne 0x502e04
push 0x550864
call fcn.005049d0
add esp, 4
push eax
push edi
push 0xf001f
call esi
test eax, eax
mov dword [esp + 0x10], eax
jne 0x502e00
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov edi, dword [esp + 0x10]
push 0x1000
push 0
push 0
push 0xf001f
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
jne 0x502e2e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push 0x550850
call fcn.005049d0
mov esi, dword [sym.imp.KERNEL32.dll_OpenMutexA]
add esp, 4
push eax
push 0
push 0x100000
call esi
mov ebp, eax
test ebp, ebp
jne 0x502e83
push 0x550844
call fcn.005049d0
add esp, 4
push eax
push ebp
push 0x100000
call esi
mov ebp, eax
test ebp, ebp
jne 0x502e83
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push 0xffffffffffffffff
push ebp
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebx]
mov eax, ebx
test ecx, ecx
je 0x502eac
add eax, ecx
mov ecx, eax
sub ecx, ebx
cmp ecx, 0xffc
jae 0x502eaa
mov ecx, dword [eax]
test ecx, ecx
jne 0x502e94
jmp 0x502eac
mov eax, ebx
mov ecx, dword [esp + 0x1c]
mov edx, eax
mov esi, 0xffc
sub edx, ebx
sub esi, ecx
cmp edx, esi
jb 0x502ec3
mov eax, ebx
jmp 0x502ee1
mov esi, dword [esp + 0x18]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
add eax, ecx
push ebx
mov dword [eax], 0
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebp
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret
Function at 0x502f20
Capabilities:
Copy file
Get common file path
Parse pe header
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x240
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx], 0
je 0x502f35
call fcn.005030e0
push ebp
lea eax, [esp + 0x14c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x51b144
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x14c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x254]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [ebx + 4]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push esi
push 0
push 0x550888
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0
lea eax, [esp + 0x150]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x503093
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x1c]
push 0x40
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x14], 0x5a4d
jne 0x50308c
mov eax, dword [esp + 0x50]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push eax
push edi
call ebp
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x5c]
push 0xf8
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x54], 0x4550
jne 0x50308c
cmp dword [esp + 0x88], 0x80000000
jbe 0x50308c
mov eax, dword [esp + 0x50]
push 0
push 0
push eax
push edi
mov dword [esp + 0x98], 0x10000000
call ebp
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x5c]
push 0xf8
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
push 8
push 0
push esi
call edi
test eax, eax
mov dword [ebx], eax
pop ebp
je 0x5030b8
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x240
ret 4
mov eax, dword [esp + 0x250]
push 8
push 0
push eax
mov byte [esi], 0
call edi
xor ecx, ecx
pop edi
test eax, eax
setne cl
mov dword [ebx], eax
pop esi
mov eax, ecx
pop ebx
add esp, 0x240
ret 4
Function at 0x503170
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x148
push ebx
push ebp
mov ebp, ecx
mov ebx, dword [ebp]
cmp ebx, 0xffffffff
jne 0x50318f
pop ebp
xor al, al
pop ebx
add esp, 0x148
ret 0xc
mov edx, dword [esp + 0x158]
mov ecx, dword [esp + 0x154]
push esi
mov esi, dword [esp + 0x160]
push edi
mov edi, dword [ebp + 8]
cmp edx, 0x613
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], esi
jne 0x50322a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
cmp eax, 0x104
mov dword [esp + 0x20], eax
jbe 0x5031e4
mov eax, 0x104
mov byte [esi + 0x103], 0
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x4c], ecx
mov ecx, eax
mov dword [esp + 0x48], edx
mov edx, ecx
lea edi, [esp + 0x54]
mov dword [esp + 0x50], eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0
and ecx, 3
add eax, 0x10
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x48]
push ecx
push eax
mov eax, dword [ebp]
push edx
push eax
jmp 0x503285
cmp edx, 0x619
jne 0x503276
mov eax, 0x10
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esi]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x38], edx
lea edx, [esp + 0x10]
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x3c], eax
push 0
push edx
lea eax, [esp + 0x2c]
push 0x20
mov dword [esp + 0x34], edi
mov dword [esp + 0x4c], ecx
push eax
jmp 0x503284
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x1c]
push 0x10
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
test eax, eax
jne 0x5032b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x5032a8
cmp eax, 0xe8
je 0x5032a8
cmp eax, 6
jne 0x5032b5
pop ebp
xor al, al
pop ebx
add esp, 0x148
ret 0xc
pop ebp
mov al, 1
pop ebx
add esp, 0x148
ret 0xc