joyce8/EMBER2024-capa huggingface dataset:
Function at 0x473f7f
Capabilities:
Persist via run registry key

Disassembly:
mov eax, 0x4a9baa
call fcn.004a80c4
sub esp, 0x18
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
cmp dword [ebx + 0x98], edi
je 0x474166
cmp dword [ebx + 0xb4], edi
je 0x474166
cmp dword [ebx + 0xf8], edi
je 0x474166
mov dword [ebp - 0x10], edi
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 4], edi
call fcn.00405f00
push 0x4bad78
lea esi, [ebx + 0xc0]
mov byte [ebp - 4], 1
call fcn.0046fae5
test eax, eax
push edi
push dword [ebp - 0x14]
lea esi, [ebp - 0x10]
push reloc.OLEAUT32.dll_SysReAllocString
jne 0x473ff6
call fcn.0046e13f
jmp 0x473ffb
call fcn.0040614e
cmp eax, edi
jne 0x47401f
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00405d7c
cmp dword [ebp - 0x10], edi
je 0x474018
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x474169
call dword [0x4d508c]
mov dword [ebp - 0x18], eax
lea eax, [ebx + 0x84]
cmp dword [eax + 0x18], 0x10
jb 0x474039
mov esi, dword [eax + 4]
jmp 0x47403c
lea esi, [eax + 4]
cmp esi, edi
je 0x474052
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x474056
xor eax, eax
jmp 0x47406c
lea eax, [edi + edi]
call fcn.00489120
mov eax, esp
push dword [ebp - 0x18]
push edi
push esi
mov esi, eax
call fcn.00408f37
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00405f00
mov byte [ebp - 4], 2
mov eax, dword [0x4da2a0]
mov ecx, 0x4da2a0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
lea eax, [ebx + 0xa0]
mov byte [ebp - 4], 3
cmp dword [eax + 0x18], 0x10
jb 0x4740a2
mov esi, dword [eax + 4]
jmp 0x4740a5
lea esi, [eax + 4]
test esi, esi
je 0x4740bb
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x4740c1
and dword [ebp - 0x1c], 0
jmp 0x4740da
lea eax, [edi + edi]
call fcn.00489120
mov eax, esp
push dword [ebp - 0x18]
push edi
push esi
mov esi, eax
call fcn.00408f37
mov dword [ebp - 0x1c], eax
cmp dword [ebx + 0x1c], 0x10
jb 0x4740e5
mov ebx, dword [ebx + 8]
jmp 0x4740e8
add ebx, 8
test ebx, ebx
je 0x4740fe
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x474102
xor eax, eax
jmp 0x474116
lea eax, [edi + edi]
call fcn.00489120
mov esi, esp
push dword [ebp - 0x18]
push edi
push ebx
call fcn.00408f37
push dword [ebp - 0x1c]
push eax
push 0x4be878
lea eax, [ebp - 0x20]
call fcn.00407174
mov edi, dword [ebp - 0x20]
add esp, 0xc
push edi
push dword [ebp - 0x24]
lea esi, [ebp - 0x10]
call fcn.00409564
lea eax, [edi - 0x10]
call fcn.00405d7c
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.00405d7c
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00405d7c
cmp dword [ebp - 0x10], 0
je 0x474166
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
lea esp, [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x475a32
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push 2
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, esi
mov dword [ebp - 4], eax
jne 0x475a54
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop esi
leave
ret
push edi
push esi
push esi
push esi
push esi
push dword [ebp + 0x18]
push dword [ebp + 8]
push 1
push 2
push 0x10
push 0x32
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
cmp edi, esi
jne 0x475ad5
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x431
je 0x475a9b
call edi
mov esi, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
jmp 0x475a51
push 2
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, esi
jne 0x475ab7
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x475a8b
push dword [ebp + 0x14]
push esi
push esi
push esi
push esi
push dword [ebp + 0x18]
push dword [ebp + 8]
push 1
push 2
push 0x10
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
je 0x475aaf
mov eax, dword [ebp + 0x14]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x475a8d

Function at 0x475af1
Capabilities:
Delete service

Disassembly:
push edi
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x475b0b
pop edi
jmp dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push esi
push 0x10000
push dword [esp + 0x14]
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x475b3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push edi
call ebx
mov eax, esi
pop esi
pop ebx
pop edi
ret
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x475b5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, eax
call edi
push esi
call edi
mov eax, ebx
jmp 0x475b36
push esi
call ebx
xor esi, esi
jmp 0x475b31
Function at 0x475b64
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
push 0x40000000
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, esi
mov dword [ebp - 8], eax
jne 0x475b89
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x475bb2
push ebx
push edi
push 0x14
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
cmp ebx, esi
jne 0x475bb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop ebx
pop esi
leave
ret
push 6
pop ecx
xor eax, eax
mov dword [ebp - 0x24], esi
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x24]
push eax
push ebx
call edi
test eax, eax
je 0x475bdd
cmp dword [ebp - 0x20], 4
jne 0x475bdd
xor eax, eax
jmp 0x475bb0
push esi
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x475c04
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 8]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
push ebx
call esi
mov eax, edi
jmp 0x475bb0
mov dword [ebp - 4], esi
cmp esi, 0xbb8
jge 0x475c45
lea eax, [ebp - 0x24]
push eax
push ebx
call edi
test eax, eax
je 0x475c33
cmp dword [ebp - 0x20], 1
je 0x475c3e
cmp dword [ebp - 0x20], 4
je 0x475c45
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
add esi, 0x64
jmp 0x475c07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x475c45
mov dword [ebp - 4], 0xe0000018
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [ebp - 4]
jmp 0x475ba5
Function at 0x4767c2
Capabilities:
Get common file path

Disassembly:
mov eax, 0x4a9b80
call fcn.004a80c4
sub esp, 0x214
push ebx
xor ebx, ebx
mov dword [ebp - 4], ebx
push esi
mov dword [ebp - 0x18], ebx
mov esi, dword [ebp + 8]
mov ecx, 0x4da2a0
call fcn.00405f43
xor esi, esi
mov dword [ebp - 4], ebx
inc esi
push ebx
mov dword [ebp - 0x18], esi
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 0x14]
push eax
push 0x1a
push ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
push 0x206
lea eax, [ebp - 0x21e]
push ebx
push eax
mov word [ebp - 0x220], bx
call fcn.00478160
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea eax, [ebp - 0x220]
push eax
call fcn.0047b2ea
test eax, eax
pop ecx
je 0x476862
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x220]
push eax
push dword [ebp + 8]
call fcn.0040611b
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x476882
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x10]
pop esi
cmp eax, ebx
pop ebx
je 0x47689a
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov dword fs:[0], ecx
leave
ret

Function at 0x4768a9
Capabilities:
Get common file path

Disassembly:
mov eax, 0x4ab675
call fcn.004a80c4
sub esp, 0x210
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 4], edi
mov ecx, 0x4da2a0
mov dword [ebp - 0x10], edi
call fcn.00405f43
push 0x208
lea eax, [ebp - 0x21a]
mov dword [ebp - 4], edi
push edi
push eax
mov dword [ebp - 0x10], 1
mov word [ebp - 0x21c], di
call fcn.00478160
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x476937
lea eax, [ebp - 0x21c]
push eax
call fcn.0047b2ea
test eax, eax
pop ecx
je 0x476937
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x21c]
push eax
push esi
call fcn.0040611b
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x476947
Capabilities:
Create shortcut via ishelllink

Disassembly:
mov eax, 0x4a8ae2
call fcn.004a80c4
push ecx
push ecx
push ebx
push edi
xor ebx, ebx
push ebx
xor edi, edi
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x10]
push eax
push 0x4ae8cc
push 1
push ebx
push 0x4ae8ec
mov byte [ebp - 4], 1
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
jl 0x4769f7
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x50]
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x24]
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x2c]
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x1c]
push dword [esi + 0x18]
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x44]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push 0x4ae92c
push eax
call dword [ecx]
cmp eax, ebx
jl 0x4769f7
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
push 1
push eax
push ecx
call dword [edx + 0x18]
cmp eax, ebx
jl 0x4769f7
inc edi
call dword [sym.imp.ole32.dll_CoUninitialize]
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x476a0d
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
cmp eax, ebx
je 0x476a1e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x477325
Capabilities:
Check if file exists
Delete file

Disassembly:
mov eax, 0x4abd41
call fcn.004a80c4
sub esp, 0x10
push ebx
push esi
mov esi, ecx
xor ebx, ebx
call fcn.00409598
cmp eax, 0xc
jne 0x47740a
lea eax, [ebp - 0x14]
push edi
push eax
call fcn.004767c2
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x14]
mov dword [esp], str.MicrosoftInternet_ExplorerQuick_LaunchUser_PinnedTaskBar_
push eax
call fcn.00406e34
mov eax, dword [0x4da2a0]
mov ecx, 0x4da2a0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 1
push dword [esi]
lea eax, [ebp - 0x18]
push dword [ebp - 0x14]
push str._s_s.lnk
call fcn.00407174
add esp, 0xc
lea edi, [esi + 0x1c]
lea eax, [ebp - 0x18]
call fcn.00405e52
mov edi, dword [ebp - 0x18]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x10]
push eax
call fcn.004768a9
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 4], 2
call fcn.00476947
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x4773eb
push dword [esi]
lea ecx, [ebp - 0x10]
push str._s.lnk
call fcn.00406aef
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
call fcn.004772eb
add esp, 0x10
push dword [ebp - 0x10]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.00405d7c
lea eax, [edi - 0x10]
call fcn.00405d7c
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00405d7c
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
mov eax, ebx
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x477be8
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x4d5304]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00477b27
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00478160
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x477c37
cmp dword [ebp - 0x1c], 5
jb 0x477c4f
jmp 0x477c4b
cmp dword [ebp - 0x10], 1
jne 0x477c4f
cmp dword [ebp - 0x1c], 4
ja 0x477c4b
jne 0x477c4f
cmp dword [ebp - 0x18], 0
jbe 0x477c4f
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4aea38
call fcn.00454e0d
test eax, eax
jge 0x477c70
mov byte [0x4dafd8], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004800fc
add ebp, 0x78
leave
ret
Function at 0x477eef
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x4da324], 0
push esi
jne 0x477e62
call fcn.00477d8d
test eax, eax
je 0x477ea5
mov eax, dword [0x4da324]
cmp eax, 1
jne 0x477e83
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x477ea5
pop esi
ret
push eax
call dword [0x4da32c]
test eax, eax
jne 0x477eed
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x477ea9
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x4da324]
call dword [0x4da32c]
mov edi, eax
test edi, edi
je 0x477ed0
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x477eec
lea edi, [esi + 0xff0]
push esi
push dword [0x4da324]
call dword [0x4da328]
add esi, 0x10
cmp esi, edi
jb 0x477ed6
mov eax, esi
pop edi
pop esi
ret
jmp 0x477e4f
Function at 0x47a06d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x47a0aa
cmp dword [ebp + 0x14], edi
je 0x47a0aa
cmp ecx, edi
jne 0x47a0b1
call fcn.00480ac3
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.00479d07
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x47a0c5
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x47a0e6
cmp ebx, 0xffffffff
je 0x47a0d5
push ebx
push edi
push ecx
call fcn.00478160
add esp, 0xc
cmp esi, edi
je 0x47a092
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x47a092
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x47a102
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x47a109
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x47a1fa
test word [esi + 0xc], 0x10c
je 0x47a15d
mov eax, dword [esi + 4]
test eax, eax
je 0x47a15d
jl 0x47a25b
cmp ebx, eax
mov edi, ebx
jb 0x47a12e
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x47a202
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0047a7bb
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x47a1f2
cmp ebx, dword [ebp - 0xc]
jb 0x47a1ca
cmp dword [ebp - 0xc], 0
je 0x47a187
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x47a17c
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x47a183
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x47a192
mov eax, SysReAllocString
cmp ebx, eax
ja 0x47a192
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x47a22e
push eax
push dword [ebp - 8]
push esi
call fcn.0047cf41
pop ecx
push eax
call fcn.004854f3
add esp, 0xc
test eax, eax
je 0x47a26d
cmp eax, 0xffffffff
je 0x47a25b
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x47a1f2
push esi
call fcn.00484e12
cmp eax, 0xffffffff
pop ecx
je 0x47a25f
cmp dword [ebp - 4], 0
je 0x47a22e
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x47a111
mov eax, dword [ebp + 0x14]
jmp 0x47a0ac
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x47a219
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.00478160
add esp, 0xc
call fcn.00480ac3
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x47a0a2
cmp dword [ebp + 0xc], 0xffffffff
je 0x47a244
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.00478160
add esp, 0xc
call fcn.00480ac3
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x47a0a2
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x47a0ac
or dword [esi + 0xc], 0x10
jmp 0x47a25f
Function at 0x47f39f
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x47f3cc
call fcn.00480ad6
mov dword [eax], esi
call fcn.00480ac3
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.00479d07
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x47f3a8
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x47f3fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00480ae9
pop ecx
call fcn.00480ac3
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x47f422
test al, 1
je 0x47f422
test byte [esp + 0xc], 2
je 0x47f422
call fcn.00480ad6
mov dword [eax], 5
call fcn.00480ac3
mov dword [eax], 0xd
jmp 0x47f3f2
xor eax, eax
pop esi
ret

Function at 0x4800fc
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4d5304]
jne 0x480106
repz ret
jmp fcn.0048e42c

Function at 0x4883e3
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4d5e20]
je 0x4883fe
inc edi
cmp edi, 0x17
jb 0x4883ef
cmp edi, 0x17
jae 0x48857e
push ebp
push 3
call fcn.00491d2e
cmp eax, 1
pop ecx
je 0x48854a
push 3
call fcn.00491d2e
test eax, eax
pop ecx
jne 0x488432
cmp dword [0x4d5160], 1
je 0x48854a
cmp ebx, 0xfc
je 0x48857d
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x4da580
push ebp
call fcn.0047f56d
add esp, 0xc
test eax, eax
je 0x488468
push esi
push esi
push esi
push esi
push esi
call fcn.00479c0b
add esp, 0x14
push 0x104
mov esi, 0x4da599
push esi
push 0
mov byte [0x4da69d], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4884ac
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0047f56d
add esp, 0xc
test eax, eax
je 0x4884ac
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00479c0b
add esp, 0x14
push esi
call fcn.0047a730
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4884f1
push esi
call fcn.0047a730
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4da894
push 0x4afb8c
sub ecx, eax
push ecx
push eax
call fcn.0047ca85
add esp, 0x14
test eax, eax
je 0x4884f1
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00479c0b
add esp, 0x14
jmp 0x4884f3
xor esi, esi
push 0x4afb88
push ebx
push ebp
call fcn.0048e789
add esp, 0xc
test eax, eax
je 0x488513
push esi
push esi
push esi
push esi
push esi
call fcn.00479c0b
add esp, 0x14
push dword [edi*8 + 0x4d5e24]
push ebx
push ebp
call fcn.0048e789
add esp, 0xc
test eax, eax
je 0x488535
push esi
push esi
push esi
push esi
push esi
call fcn.00479c0b
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.00491b71
add esp, 0xc
jmp 0x48857d
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x48857d
cmp ebp, 0xffffffff
je 0x48857d
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4d5e24]
push dword [esi]
call fcn.0047a730
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x491b71
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004837aa
xor ebx, ebx
cmp dword [0x4daed8], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x491c47
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x491d27
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x491d27
push eax
call fcn.0048373c
mov dword [esp], 0x4aff88
push edi
mov dword [0x4daed8], eax
call esi
push eax
call fcn.0048373c
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4daedc], eax
call esi
push eax
call fcn.0048373c
mov dword [0x4daee0], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0047ccce
test eax, eax
pop ecx
pop ecx
je 0x491c15
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00479c0b
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x491c47
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0048373c
cmp eax, ebx
pop ecx
mov dword [0x4daee8], eax
je 0x491c47
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0048373c
pop ecx
mov dword [0x4daee4], eax
mov eax, dword [0x4daee4]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x491ccc
cmp dword [0x4daee8], ecx
je 0x491ccc
push eax
call fcn.004837b3
push dword [0x4daee8]
mov esi, eax
call fcn.004837b3
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x491ccc
cmp edi, ebx
je 0x491ccc
call esi
cmp eax, ebx
je 0x491c99
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x491c99
test byte [ebp - 0x18], 1
jne 0x491ccc
lea eax, [ebp - 0x10]
push eax
call fcn.0047cd05
test eax, eax
pop ecx
je 0x491cb4
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00479c0b
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x491cc3
or dword [ebp + 0x10], 0x200000
jmp 0x491d07
or dword [ebp + 0x10], 0x40000
jmp 0x491d07
mov eax, dword [0x4daedc]
cmp eax, dword [ebp - 8]
je 0x491d07
push eax
call fcn.004837b3
cmp eax, ebx
pop ecx
je 0x491d07
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x491d07
mov eax, dword [0x4daee0]
cmp eax, dword [ebp - 8]
je 0x491d07
push eax
call fcn.004837b3
cmp eax, ebx
pop ecx
je 0x491d07
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4daed8]
call fcn.004837b3
cmp eax, ebx
pop ecx
je 0x491d27
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x491d29
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x494224
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x4d5304]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x494265
cmp byte [ebp - 0x194], 2
jne 0x49425f
cmp byte [ebp - 0x193], 2
je 0x494268
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004800fc
leave
ret