joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40dc60
Capabilities:
Read .ini file

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x40c
lea eax, [esp + 4]
push esi
push eax
push ecx
call fcn.0040df60
mov esi, eax
add esp, 8
test esi, esi
jne 0x40ddfb
mov eax, dword [esp + 8]
push edi
push ebp
mov ebp, dword [esp + 0x420]
push ebx
push str.mdm.ini
lea edx, [esp + 0x220]
push 0x200
push edx
push 0x41776c
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov edx, dword [esp + 0x428]
lea ecx, [esp + 0x10]
push ecx
lea eax, [esp + 0x220]
push edx
push eax
call fcn.0040de90
add esp, 0xc
test al, al
je 0x40dde8
mov ecx, dword [esp + 0x10]
push 0x20
push ecx
call dword [sym.imp.MSVCRT.dll__mbschr]
mov ebx, dword [sym.imp.MSVCRT.dll__mbsninc]
add esp, 8
test eax, eax
je 0x40dcfb
push eax
call dword [sym.imp.MSVCRT.dll__mbsinc]
add esp, 4
jmp 0x40dd12
mov edx, dword [esp + 0x10]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
call ebx
add esp, 8
mov edx, eax
mov eax, dword [esp + 0x10]
lea edi, [esp + 0x21c]
or ecx, 0xffffffff
mov byte [eax], 0
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea esi, [esp + 0x1c]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x18], esi
mov esi, edi
mov edi, dword [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp byte [edx], 0
je 0x40dd7b
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40dda8
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40dda8
lea eax, [esp + 0x1c]
push ecx
push eax
call ebx
add esp, 8
lea ecx, [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__mbsdec]
add esp, 8
mov byte [eax], 0
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push str.mdm.ini
push edx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
je 0x40ddc6
xor esi, esi
jmp 0x40dded
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x40dde4
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x40dded
xor esi, esi
jmp 0x40dded
mov esi, 1
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
pop ebx
pop ebp
pop edi
mov eax, esi
pop esi
add esp, 0x40c
ret
Function at 0x40f2f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push ecx
lea ecx, [ebp - 0xc]
call fcn.0040e1c0
mov edi, dword [ebp + 8]
test edi, edi
jne 0x40f30d
xor eax, eax
jmp 0x40f32e
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and al, 0xfc
call fcn.00414820
mov eax, esp
push esi
push edi
push eax
call fcn.0040f850
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
test edi, edi
mov dword [ebp + 8], edi
je 0x40f357
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
jne 0x40f365
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x40f391
jmp 0x40f37f
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x40f395
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x40f391
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x40f3e0
xor esi, esi
jmp 0x40f3e0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov eax, esi
cmp byte [ebx + esi], 0
je 0x40f3d1
lea edi, [ebx + 1]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.00414820
mov ecx, edi
mov eax, esp
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 edi, dword [ebp + 8]
mov byte [eax + ebx], 0
mov ecx, dword [ebp + 0x14]
push ecx
push eax
lea ecx, [ebp - 0xc]
call fcn.0040ef60
mov esi, eax
test edi, edi
je 0x40f3eb
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea esp, [ebp - 0x18]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40f660
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push ecx
lea ecx, [ebp - 0xc]
call fcn.0040e1c0
mov edi, dword [ebp + 8]
test edi, edi
jne 0x40f67d
xor eax, eax
jmp 0x40f69e
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and al, 0xfc
call fcn.00414820
mov eax, esp
push esi
push edi
push eax
call fcn.0040f850
push 0
push 1
push 3
push 0
push 0
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
test edi, edi
jne 0x40f6de
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x40f73a
call esi
and eax, 0xffff
or eax, 0x80070000
lea esp, [ebp - 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0
push 0
push 2
push 0
push edi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
test ebx, ebx
je 0x40f716
push 0
push 0
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
test esi, esi
jne 0x40f748
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x40f73a
call esi
and eax, 0xffff
or eax, 0x80070000
lea esp, [ebp - 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor eax, eax
lea esp, [ebp - 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
cmp byte [esi + eax], 0
je 0x40f762
mov eax, 0x80004005
lea esp, [ebp - 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 0xc]
push ecx
push esi
lea ecx, [ebp - 0xc]
call fcn.0040ef60
push esi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
mov eax, dword [ebp + 8]
lea esp, [ebp - 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x4117b0
Capabilities:
Set registry value

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov esi, ecx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esi]
inc eax
push eax
mov eax, dword [esp + 0x14]
push edi
push 1
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
ret 8
Function at 0x4117e0
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x415acb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x114
push ebp
push esi
push edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0x130]
mov ecx, dword [ecx]
push 0xf003f
push eax
push ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x134], 0
call fcn.004115c0
mov esi, eax
test esi, esi
jne 0x4118bb
lea edx, [esp + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push edx
mov edx, dword [esp + 0x10]
push eax
push eax
push eax
lea eax, [esp + 0x20]
lea ecx, [esp + 0x30]
push eax
push ecx
mov ebp, 0x100
push esi
push edx
mov dword [esp + 0x30], ebp
call edi
test eax, eax
jne 0x41189b
lea eax, [esp + 0x20]
lea ecx, [esp + 0xc]
push eax
call fcn.004117e0
mov esi, eax
test esi, esi
jne 0x4118bb
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x10]
push eax
push eax
push eax
lea eax, [esp + 0x30]
push edx
push eax
push esi
push ecx
mov dword [esp + 0x30], ebp
call edi
test eax, eax
je 0x411865
lea ecx, [esp + 0xc]
call fcn.00411540
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x130]
push edx
mov ecx, dword [eax]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
lea ecx, [esp + 0xc]
mov dword [esp + 0x128], 0xffffffff
call fcn.00411540
mov ecx, dword [esp + 0x120]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebp
add esp, 0x120
ret 4
Function at 0x412270
Capabilities:
Get user security identifier

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x20]
mov ebp, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
lea ecx, [esp + 0x10]
xor esi, esi
push eax
mov eax, dword [edi]
push ecx
lea edx, [esp + 0x1c]
push esi
push edx
push eax
push ebx
push esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
call ebp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x4122cb
cmp eax, esi
je 0x412354
and eax, 0xffff
or eax, 0x80070000
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov ecx, dword [esp + 0x10]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
je 0x412367
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [edi], eax
test eax, eax
je 0x41235e
lea ecx, [esp + 0x20]
lea edx, [esp + 0x10]
push ecx
push edx
lea ecx, [esp + 0x1c]
push esi
push ecx
push eax
push ebx
push 0
call ebp
test eax, eax
jne 0x41234b
mov edx, dword [edi]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [edi], 0
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 4
call esi
test eax, eax
je 0x412354
call esi
and eax, 0xffff
or eax, 0x80070000
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x8007000e
pop ebx
add esp, 8
ret
Function at 0x412a00
Capabilities:
Compare security identifiers

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x10
lea eax, [esp + 0x18]
push ebx
push ebp
push esi
push edi
push eax
push ecx
call fcn.00412270
add esp, 8
test eax, eax
jl 0x412ab4
mov ebx, dword [esp + 0x24]
push 2
lea edx, [esp + 0x18]
push 0xc
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
mov eax, dword [esp + 0x14]
xor esi, esi
test eax, eax
jbe 0x412aa4
mov ebp, dword [sym.imp.ADVAPI32.dll_GetAce]
mov edi, dword [sym.imp.ADVAPI32.dll_EqualSid]
lea eax, [esp + 0x10]
push eax
push esi
push ebx
call ebp
test eax, eax
je 0x412abc
mov ecx, dword [esp + 0x10]
mov al, byte [ecx]
test al, al
jne 0x412a73
add ecx, 8
push ecx
mov ecx, dword [esp + 0x2c]
push ecx
call edi
test eax, eax
jne 0x412aea
jmp 0x412a9b
cmp al, 1
jne 0x412a88
mov edx, dword [esp + 0x28]
add ecx, 8
push ecx
push edx
call edi
test eax, eax
jne 0x412af4
jmp 0x412a9b
cmp al, 2
jne 0x412a9b
mov eax, dword [esp + 0x28]
add ecx, 8
push ecx
push eax
call edi
test eax, eax
jne 0x412b14
mov eax, dword [esp + 0x14]
inc esi
cmp esi, eax
jb 0x412a4b
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 4
call esi
test eax, eax
je 0x412ab2
call esi
and eax, 0xffff
or eax, 0x80070000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteAce]
jmp 0x412aa4
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteAce]
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteAce]
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret

Function at 0x414170
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x10c
lea eax, [esp]
push esi
mov esi, dword [esp + 0x118]
push edi
mov edi, dword [esp + 0x118]
push eax
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4141a5
mov eax, 0x80040153
pop edi
pop esi
add esp, 0x10c
ret
mov edx, dword [esp + 8]
lea ecx, [esp + 0xc]
push 0x105
push ecx
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x4141d9
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x80040153
pop edi
pop esi
add esp, 0x10c
ret
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
add esp, 0x10c
ret
Function at 0x414ac0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418530
push 0x414c9a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffff98
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 4], 0
push 2
call dword [sym.imp.MSVCRT.dll___set_app_type]
add esp, 4
mov dword [0x41b2b4], 0xffffffff
mov dword [0x41b2b8], 0xffffffff
call dword [sym.imp.MSVCRT.dll___p__fmode]
mov ecx, dword [0x41b2a8]
mov dword [eax], ecx
call dword [sym.imp.MSVCRT.dll___p__commode]
mov edx, dword [0x41b2a4]
mov dword [eax], edx
mov eax, dword [sym.imp.MSVCRT.dll__adjust_fdiv]
mov ecx, dword [eax]
mov dword [0x41b2b0], ecx
call fcn.00414d10
mov eax, dword [0x41b0c0]
test eax, eax
jne 0x414b51
push 0x414d00
call dword [sym.imp.MSVCRT.dll___setusermatherr]
add esp, 4
call fcn.00414cd0
push 0x41b010
push 0x41b00c
call sub.MSVCRT.dll__initterm
add esp, 8
mov edx, dword [0x41b2a0]
mov dword [ebp - 0x6c], edx
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [0x41b29c]
push ecx
lea edx, [ebp - 0x64]
push edx
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x60]
push ecx
call dword [sym.imp.MSVCRT.dll___getmainargs]
add esp, 0x14
push 0x41b008
push section..data
call sub.MSVCRT.dll__initterm
add esp, 8
mov edx, dword [sym.imp.MSVCRT.dll__acmdln]
mov esi, dword [edx]
mov dword [ebp - 0x74], esi
cmp byte [esi], 0x22
jne 0x414c5f
inc esi
mov dword [ebp - 0x74], esi
mov al, byte [esi]
test al, al
je 0x414bc5
cmp al, 0x22
jne 0x414bb7
cmp byte [esi], 0x22
jne 0x414bce
inc esi
mov dword [ebp - 0x74], esi
mov al, byte [esi]
test al, al
je 0x414bde
cmp al, 0x20
ja 0x414bde
inc esi
mov dword [ebp - 0x74], esi
jmp 0x414bce
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x414bff
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x414c04
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x68], eax
push eax
call dword [sym.imp.MSVCRT.dll_exit]
jmp 0x414c44
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x414bce
inc esi
mov dword [ebp - 0x74], esi
jmp 0x414c5f

Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
pop eax
nop
nop
nop
nop
nop
nop
add eax, 0x40729f
sub eax, 0x407245
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
jl 0x432030
nop
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43201e
nop
nop
popal
nop
nop
nop
nop
jmp 0x431219
Function at 0x4076d0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
lea edx, [ecx + 2]
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4076e0
sub ecx, edx
sar ecx, 1
push 2
lea eax, [ecx + 4]
push eax
call fcn.0046def4
mov ebx, eax
add esp, 8
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x4077a0
mov ecx, ebx
sub ecx, esi
mov edi, edi
movzx eax, word [esi]
mov word [ecx + esi], ax
lea esi, [esi + 2]
test ax, ax
jne 0x407710
push 0x5c
push ebx
call fcn.0046f795
add esp, 8
test eax, eax
je 0x407734
xor ecx, ecx
mov word [eax + 2], cx
cmp word [ebx], 0x5c
jne 0x40775d
cmp word [ebx + 2], 0x5c
jne 0x40775d
lea eax, [ebx + 4]
push 0x5c
push eax
call fcn.0046f83b
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x407780
push 0x5c
lea eax, [ebx + 2]
push eax
jmp 0x407776
cmp word [ebx + 2], 0x3a
jne 0x407773
cmp word [ebx + 4], 0x5c
jne 0x407773
push 0x5c
lea eax, [ebx + 6]
push eax
jmp 0x407776
push 0x5c
push ebx
call fcn.0046f83b
add esp, 8
mov ebx, eax
push 2
push 0x104
call fcn.0046def4
mov esi, eax
add esp, 8
test esi, esi
jne 0x4077aa
push dword [ebp - 4]
call fcn.0046d737
add esp, 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
test ebx, ebx
je 0x407817
mov eax, ebx
sub eax, ecx
sar eax, 1
push eax
push ecx
push esi
call fcn.0046f8e9
push esi
call fcn.0046f92c
add esp, 0x10
test eax, eax
je 0x4077f3
push esi
call fcn.0046fa49
add esp, 4
test eax, eax
je 0x4077e0
mov edi, 1
jmp 0x4077f3
push esi
call fcn.0046f92c
add esp, 4
test eax, eax
mov eax, 1
cmovne edi, eax
lea eax, [ebx + 2]
push 0x5c
push eax
mov dword [ebp - 8], ebx
call fcn.0046f83b
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40788b
mov ecx, dword [ebp - 8]
test edi, edi
je 0x4077b1
jmp 0x40788b
mov edx, esi
sub edx, dword [ebp - 4]
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x407820
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407834
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jbe 0x407857
cmp word [esi + ecx*2 - 2], 0x5c
jne 0x407857
xor eax, eax
mov word [esi + ecx*2 - 2], ax
push esi
call fcn.0046f92c
add esp, 4
test eax, eax
je 0x40788b
push esi
call fcn.0046fa49
add esp, 4
test eax, eax
je 0x407878
mov edi, 1
jmp 0x40788b
push esi
call fcn.0046f92c
add esp, 4
mov ecx, 1
test eax, eax
cmovne edi, ecx
push esi
call fcn.0046d737
push dword [ebp - 4]
call fcn.0046d737
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4078b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4078df
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x26
neg eax
sbb eax, eax
add eax, 0x40000002
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
cmp ecx, 0xffffffff
jne 0x4078f0
mov eax, 0x40000001
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp ecx, dword [ebp + 8]
mov edx, 0x40000002
cmovne eax, edx
mov esp, ebp
pop ebp
ret
Function at 0x407910
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x407942
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x70
neg eax
sbb eax, eax
add eax, 0x40000004
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp dword [ebp - 4], esi
mov ecx, 0x40000004
cmovne eax, ecx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4079a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, edx
push 1
push 0x8000
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], ecx
xor esi, esi
call fcn.0046def4
add esp, 8
mov dword [ebp - 4], eax
test edi, edi
je 0x407a63
lea ecx, [ecx]
push 0
mov ebx, 0x8000
cmp edi, ebx
cmovb ebx, edi
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
push dword [ebp - 0xc]
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407a5b
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x407a65
cmp eax, ebx
jne 0x407a65
mov ecx, ebx
shr ecx, 2
mov edx, edi
test ecx, ecx
je 0x407a21
lea esp, [esp]
mov eax, esi
shr eax, 0x1f
add edx, 4
lea esi, [eax + esi*2]
add esi, dword [edx - 4]
dec ecx
jne 0x407a10
mov eax, ebx
and eax, 3
mov dword [ebp - 0x14], eax
mov edi, 0
jbe 0x407a48
mov ebx, eax
movzx ecx, byte [edi + edx]
mov eax, esi
shr eax, 0x1f
add ecx, eax
inc edi
lea esi, [ecx + esi*2]
cmp edi, ebx
jb 0x407a32
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 8]
sub edi, ebx
mov dword [ebp - 8], edi
jne 0x4079d0
mov edi, dword [ebp - 4]
jmp 0x407a65
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407a65
mov edi, eax
push 0x8000
push 0
push edi
call fcn.004724a0
push edi
call fcn.0046d737
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408080
Capabilities:
Create directory
Get common file path

Disassembly:
push esi
mov esi, dword [0x4b487c]
push edi
push 2
push 0x104
call fcn.0046def4
mov edi, eax
add esp, 8
test edi, edi
je 0x4080c7
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
push 0
push 0x492db4
push edi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push edi
call fcn.0046d737
mov esi, dword [0x4b487c]
add esp, 4
cmp word [esi], 0
je 0x4080f8
push esi
call fcn.0046f1b9
add esp, 4
push 0
push dword [0x4b487c]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4080f8
mov ecx, dword [0x4b487c]
call fcn.004250f0
pop edi
xor eax, eax
pop esi
ret
pop edi
mov eax, 0x67
pop esi
ret
Function at 0x4081c0
Capabilities:
Set current directory

Disassembly:
mov eax, dword [0x4b4b60]
test eax, eax
je 0x4081f3
cmp dword [0x4b4b5c], 0
je 0x4081e2
push eax
mov ecx, 0x4b4c94
call fcn.00462360
mov eax, dword [0x4b4b60]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4b4b60], 0
mov eax, dword [0x4b4888]
test eax, eax
je 0x408230
push 0x5c
push eax
call fcn.0046f795
add esp, 8
test eax, eax
je 0x408230
mov edx, dword [0x4b4888]
mov ecx, eax
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jae 0x408224
xor ecx, ecx
mov word [eax + 2], cx
jmp 0x408229
xor ecx, ecx
mov word [eax], cx
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push edi
mov edi, dword [0x4b4880]
test edi, edi
je 0x40831d
cmp word [edi], 0
je 0x408314
xor esi, esi
push edi
call fcn.0046f1b9
add esp, 4
test eax, eax
je 0x408279
call fcn.0046fc1a
cmp dword [eax], 2
je 0x408279
push 0x3e8
call ebx
inc esi
cmp esi, 0xa
jl 0x408253
jmp 0x4082e5
mov ecx, edi
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408280
sub ecx, edx
sar ecx, 1
push 2
lea eax, [ecx + 1]
push eax
call fcn.0046def4
mov esi, eax
add esp, 8
test esi, esi
je 0x4082e5
mov edx, esi
mov ecx, edi
sub edx, edi
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x4082b0
push 0x5c
push esi
call fcn.0046f795
add esp, 8
test eax, eax
je 0x4082dc
xor ecx, ecx
push esi
mov word [eax], cx
call fcn.0046fc6e
add esp, 4
push esi
call fcn.0046d737
add esp, 4
mov ecx, edi
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4082f0
sub ecx, edx
sar ecx, 1
lea edi, [edi + ecx*2]
add edi, 2
cmp word [edi], ax
jne 0x408251
mov edi, dword [0x4b4880]
push edi
call fcn.0046d737
add esp, 4
mov edx, dword [0x4b487c]
test edx, edx
je 0x40838a
xor esi, esi
lea esp, [esp]
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408335
sub ecx, edi
sar ecx, 1
cmp ecx, 3
jle 0x408358
cmp word [edx + ecx*2 - 2], 0x5c
jne 0x408358
xor eax, eax
mov word [edx + ecx*2 - 2], ax
push edx
call fcn.0046fc6e
add esp, 4
test eax, eax
je 0x408384
call fcn.0046fc1a
cmp dword [eax], 2
je 0x408384
push 0x3e8
call ebx
inc esi
cmp esi, 0xa
jge 0x408384
mov edx, dword [0x4b487c]
jmp 0x408330
mov edx, dword [0x4b487c]
push edx
call fcn.0046d737
push dword [0x4b4888]
mov dword [0x4b487c], 0
call fcn.0046d737
add esp, 8
mov dword [0x4b4888], 0
pop edi
pop esi
pop ebx
ret