joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401640
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x40c
mov eax, dword [0x414110]
push ebx
push esi
push edi
mov dword [esp + 0x414], eax
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0xff
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
test ecx, ecx
stosw word es:[edi], ax
stosb byte es:[edi], al
lea esi, [esp + 0x10]
je 0x401726
mov al, byte [ecx]
test al, al
je 0x401726
lea esp, [esp]
cmp al, 0x2f
je 0x40169c
cmp al, 0x5c
je 0x40169c
mov byte [esi], al
jmp 0x40169f
mov byte [esi], 0x5c
mov al, byte [ecx + 1]
inc esi
inc ecx
test al, al
jne 0x401690
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov byte [esi], al
mov ebx, esi
mov al, byte [esi - 1]
dec esi
test al, al
je 0x40170e
lea ebx, [ebx]
cmp byte [esi], 0x5c
je 0x4016cd
mov al, byte [esi - 1]
dec esi
test al, al
jne 0x4016c0
cmp byte [esi], 0
je 0x40170e
lea ecx, [esp + 0x10]
push ecx
mov byte [esi], 0
call edi
cmp eax, 0xffffffff
je 0x4016b2
test al, 0x10
je 0x4016b2
mov byte [esi], 0x5c
inc esi
cmp esi, ebx
jae 0x40170e
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp byte [esi], 0
jne 0x401709
push 0
lea edx, [esp + 0x14]
push edx
call edi
cmp eax, 1
jne 0x401726
mov byte [esi], 0x5c
inc esi
cmp esi, ebx
jb 0x4016f3
mov eax, 1
mov ecx, dword [esp + 0x414]
call fcn.004054c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x414]
xor eax, eax
call fcn.004054c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401740
Capabilities:
Copy file

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
ret
Function at 0x401a60
Capabilities:
Delete directory
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x544
mov eax, dword [0x414110]
push esi
mov esi, dword [esp + 0x54c]
push edi
push esi
mov dword [esp + 0x54c], eax
lea eax, [esp + 0x14c]
push str._s.
push eax
call fcn.0040624e
add esp, 0xc
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x14c]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x401b4a
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_FindNextFileA]
lea eax, [esp + 0x38]
push 0x410260
push eax
call fcn.00405b33
add esp, 8
test eax, eax
je 0x401b2b
lea ecx, [esp + 0x38]
push 0x41025c
push ecx
call fcn.00405b33
add esp, 8
test eax, eax
je 0x401b2b
lea edx, [esp + 0x38]
push edx
push esi
lea eax, [esp + 0x154]
push str._s_s
push eax
call fcn.0040624e
mov al, byte [esp + 0x1c]
add esp, 0x10
test al, 0x10
je 0x401b17
lea ecx, [esp + 0x14c]
push ecx
call fcn.00401a60
add esp, 4
jmp 0x401b2b
push 0
lea edx, [esp + 0x150]
push 0
push edx
call fcn.00401760
add esp, 0xc
lea eax, [esp + 0xc]
push eax
push edi
call ebp
test eax, eax
jne 0x401ab6
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop ebp
mov ecx, dword [esp + 0x548]
pop edi
pop esi
call fcn.004054c0
add esp, 0x544
ret

Function at 0x402130
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4102c8
push 0x406b38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
xor edi, edi
xor esi, esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x1c]
push eax
push 0xf01ff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4021bd
push 1
push str.SeDebugPrivilege
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00402080
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
push edi
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, edi
je 0x4021bd
push 1
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x4021bd
mov dword [ebp - 0x24], 1
mov dword [ebp - 4], 0xffffffff
call fcn.004021e2
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402200
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x33c
mov eax, dword [0x414110]
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x33c], eax
push esi
xor eax, eax
test ebx, ebx
push edi
je 0x40238a
mov byte [esp + 0x140], al
mov ecx, 0x7f
lea edi, [esp + 0x141]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x140]
stosb byte es:[edi], al
mov eax, ebx
sub edx, ebx
jmp 0x402250
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402250
mov eax, ebx
xor edi, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402261
sub eax, edx
mov dword [esp + 0x10], eax
je 0x4022bd
mov eax, ebx
lea ecx, [esp + 0x140]
sub eax, ecx
mov dword [esp + 0x10], eax
jmp 0x402290
mov eax, dword [esp + 0x10]
jmp 0x402290
lea esi, [esp + edi + 0x140]
movsx edx, byte [eax + esi]
push edx
call fcn.00406d8e
mov byte [esi], al
mov eax, ebx
add esp, 4
inc edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4022b0
sub eax, edx
cmp edi, eax
jb 0x402281
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
xor eax, eax
cmp ebx, 0xffffffff
je 0x40238a
mov ecx, 0x49
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], eax
lea eax, [esp + 0x18]
push eax
push ebx
mov dword [esp + 0x20], 0x128
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x40237f
lea ecx, [ecx]
lea eax, [esp + 0x3c]
xor esi, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402310
sub eax, edx
mov dword [esp + 0x14], eax
je 0x40234d
nop
movsx ecx, byte [esp + esi + 0x3c]
push ecx
call fcn.00406d8e
mov byte [esp + esi + 0x40], al
lea eax, [esp + 0x40]
add esp, 4
inc esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402340
sub eax, edx
cmp esi, eax
jb 0x402320
lea edx, [esp + 0x140]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00406c40
add esp, 8
test eax, eax
jne 0x402377
lea ecx, [esp + 0x18]
push ecx
push ebx
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x402300
jmp 0x40237f
mov dword [esp + 0x10], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x344]
call fcn.004054c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4023a0
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4102d8
push 0x406b38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x13c
mov eax, dword [0x414110]
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
xor edi, edi
push edi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
mov dword [ebp - 0x14c], esi
cmp esi, 0xffffffff
jne 0x4023ec
xor eax, eax
jmp 0x40248c
mov dword [ebp - 0x148], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x144], edi
mov ecx, 0x49
xor eax, eax
lea edi, [ebp - 0x140]
rep stosd dword es:[edi], eax
mov ebx, 0x128
mov dword [ebp - 0x144], ebx
lea eax, [ebp - 0x144]
push eax
push esi
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x40247a
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x120]
push edx
call fcn.00405bc7
add esp, 8
test eax, eax
jne 0x402454
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x13c]
mov dword [eax], ecx
mov dword [ebp - 0x148], 1
jmp 0x40247a
mov ecx, 0x4a
xor eax, eax
lea edi, [ebp - 0x144]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x144], ebx
lea edx, [ebp - 0x144]
push edx
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x402426
mov dword [ebp - 4], 0xffffffff
call fcn.004024ab
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x1c]
call fcn.004054c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4024c0
Capabilities:
Acquire debug privileges
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x4024c9
ret
lea ecx, [esp + 4]
push ecx
push eax
mov dword [esp + 0xc], 0
call fcn.004023a0
add esp, 8
test eax, eax
jne 0x4024e9
mov eax, 1
ret
mov edx, dword [esp + 4]
mov dword [esp + 4], edx
jmp fcn.00402130

Function at 0x4026a0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc14
mov eax, dword [0x414110]
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0xc14], eax
push esi
xor eax, eax
test ebx, ebx
push edi
mov edx, ecx
je 0x402737
mov edx, dword [edx]
mov ecx, 0x300
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x18]
push eax
xor esi, esi
push esi
push ecx
push edx
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 0xbff
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402732
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push ebx
mov esi, 1
call fcn.004055be
add esp, 0xc
mov eax, esi
mov ecx, dword [esp + 0xc1c]
call fcn.004054c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov byte [ebx], 0
mov eax, esi
mov ecx, dword [esp + 0xc1c]
call fcn.004054c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402a40
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push edi
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
mov dword [esp + 4], eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
lea ecx, [esp + 4]
push ecx
mov ecx, dword [esp + 0x60]
lea edx, [esp + 0x18]
push edx
push eax
push eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x74]
or eax, 0x8000000
push eax
push 0
push 0
push 0
push ecx
push 0
mov dword [esp + 0x3c], 0x44
mov dword [esp + 0x44], str.winsta0Default
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
pop edi
jne 0x402aa3
add esp, 0x54
ret
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x402ab7
mov edx, dword [esp]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 8]
push ecx
call esi
mov eax, 1
pop esi
add esp, 0x54
ret

Function at 0x402ae0
Capabilities:
Get common file path
Get program files directory

Disassembly:
mov eax, dword [esp + 4]
push eax
push 0
push 0
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
ret

Function at 0x402b00
Capabilities:
Get common file path

Disassembly:
sub esp, 0x404
mov eax, dword [0x414110]
mov dword [esp + 0x400], eax
lea eax, [esp]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, 0x400
ja 0x402b5d
test eax, eax
je 0x402b5d
mov edx, dword [esp + 0x408]
lea eax, [esp]
mov ecx, eax
sub edx, ecx
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402b40
mov ecx, dword [esp + 0x400]
call fcn.004054c0
add esp, 0x404
ret
mov edx, dword [str.c:_temp]
mov eax, dword [esp + 0x408]
mov dword [eax], edx
mov ecx, dword [0x41030c]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x400]
call fcn.004054c0
add esp, 0x404
ret

Function at 0x402cb0
Capabilities:
Check if file exists

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push edi
mov edi, dword [esp + 0x14]
xor esi, esi
push edi
call fcn.004024c0
add esp, 4
test eax, eax
jne 0x402d01
call ebx
push eax
push edi
push 0x41039c
push 0x41037c
push 0x4150f8
call fcn.00401fc0
add esp, 0x14
push 0xa
call ebp
inc esi
cmp esi, 2
jl 0x402cc6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret 4
Function at 0x404760
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40fb08
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
mov eax, dword [0x414110]
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x50]
xor ecx, ecx
mov edi, 0x10
cmp eax, edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], ecx
jb 0x4047a1
mov eax, dword [esi + 0x3c]
jmp 0x4047a4
lea eax, [esi + 0x3c]
cmp eax, ecx
jbe 0x404822
push 0xffffffffffffffff
push ecx
lea eax, [esi + 0x1c]
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 0x2c], cl
push eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x18], 0xf
call fcn.00401d50
push 7
push str.id.log
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call fcn.004030d0
cmp dword [ebp - 0x18], edi
mov ecx, dword [ebp - 0x2c]
jae 0x4047e2
lea ecx, [ebp - 0x2c]
cmp dword [esi + 0x50], edi
jb 0x4047ec
mov eax, dword [esi + 0x3c]
jmp 0x4047ef
lea eax, [esi + 0x3c]
push 1
push ecx
push eax
call fcn.00401740
mov eax, dword [esi + 0x50]
add esp, 0xc
cmp eax, edi
jb 0x404807
mov esi, dword [esi + 0x3c]
jmp 0x40480a
add esi, 0x3c
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x18], edi
jb 0x404822
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00406a16
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.004054c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x404850
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40fb2b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
mov eax, dword [0x414110]
push ebx
push esi
push edi
mov esi, ecx
push str.id.log
mov dword [esp + 0x138], eax
lea eax, [esp + 0x10]
push esi
push eax
call fcn.00403280
add esp, 0xc
mov eax, dword [esp + 0x24]
mov ebx, 0x10
cmp eax, ebx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x144], 0
jae 0x4048b5
lea eax, [esp + 0x10]
push eax
call fcn.004012b0
add esp, 4
test eax, eax
je 0x40493e
lea edx, [esp + 0x28]
push edx
xor eax, eax
mov byte [esp + 0x2c], 0
mov ecx, 0x41
lea edi, [esp + 0x2d]
push 0x104
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [esp + 0x28]
lea edx, [eax + 1]
jmp 0x4048f0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4048f0
sub eax, edx
push eax
lea eax, [esp + 0x2c]
add esi, 0x38
push eax
mov ecx, esi
call fcn.00401e40
push 7
push str.id.log
mov ecx, esi
call fcn.004030d0
cmp dword [esi + 0x18], ebx
jb 0x404921
mov esi, dword [esi + 4]
jmp 0x404924
add esi, 4
cmp dword [esp + 0x24], ebx
mov eax, dword [esp + 0x10]
jae 0x404932
lea eax, [esp + 0x10]
push 0
push esi
push eax
call fcn.00401740
add esp, 0xc
cmp dword [esp + 0x24], ebx
jb 0x404951
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00406a16
add esp, 4
mov ecx, dword [esp + 0x13c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x134]
call fcn.004054c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404c60
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x428
mov eax, dword [0x414110]
mov dword [esp + 0x424], eax
push esi
push edi
xor eax, eax
mov byte [esp + 0x28], 0
mov ecx, 0xff
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x28]
push 0x400
push eax
call section..text
lea edi, [esp + 0x30]
add esp, 8
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404ca6
mov ecx, dword [str._bmploader.log]
mov edx, dword [0x410a8c]
mov eax, dword [0x410a90]
mov dword [edi], ecx
mov cx, word [0x410a94]
mov dword [edi + 4], edx
mov dl, byte [0x410a96]
mov dword [edi + 8], eax
mov word [edi + 0xc], cx
push 0x2c
mov byte [edi + 0xe], dl
call fcn.00404e00
add esp, 4
test eax, eax
je 0x404cf4
mov ecx, eax
call fcn.00404b90
mov esi, eax
jmp 0x404cf6
xor esi, esi
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.00404bd0
push str.SIM_D95AF572_67E0_4751_9F03_547DE35B77B9
push 0
push 0
mov dword [0x4150f8], esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x404d43
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x42c]
call fcn.004054c0
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
call fcn.00402ec0
mov esi, eax
test esi, esi
jne 0x404d7c
push 0x410a44
push 0x41037c
push 0x4150f8
call fcn.00401fc0
add esp, 0xc
or eax, 0xffffffff
mov ecx, dword [esp + 0x42c]
call fcn.004054c0
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
push 0
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.USER32.dll_GetMessageA]
mov edx, dword [ebp + 0x10]
push edx
mov ecx, esi
call fcn.00402ba0
test eax, eax
jne 0x404dc1
mov ecx, esi
call fcn.00403cf0
test eax, eax
je 0x404dd8
push 0x410a30
jmp 0x404dc6
push 0x410a18
push 0x41037c
push 0x4150f8
call fcn.00401fc0
add esp, 0xc
mov ecx, dword [esp + 0x42c]
xor eax, eax
call fcn.004054c0
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
Function at 0x407213
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x410c38
call fcn.0040868c
mov edi, 0x94
mov eax, edi
call fcn.00406af0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x4152fc], ecx
mov eax, dword [esi + 4]
mov dword [0x415308], eax
mov edx, dword [esi + 8]
mov dword [0x41530c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x415300], esi
cmp ecx, 2
je 0x407273
or esi, 0x8000
mov dword [0x415300], esi
shl eax, 8
add eax, edx
mov dword [0x415304], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4072ae
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4072ae
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4072c6
cmp eax, 0x20b
je 0x4072b3
mov dword [ebp - 0x1c], esi
jmp 0x4072da
cmp dword [ecx + 0x84], 0xe
jbe 0x4072ae
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4072d4
cmp dword [ecx + 0x74], 0xe
jbe 0x4072ae
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040ca1e
pop ecx
test eax, eax
jne 0x4072ee
push 0x1c
call fcn.004071ef
pop ecx
call fcn.00408337
test eax, eax
jne 0x4072ff
push 0x10
call fcn.004071ef
pop ecx
call fcn.0040c97c
mov dword [ebp - 4], esi
call fcn.0040a7b6
test eax, eax
jge 0x407318
push 0x1b
call fcn.004071ca
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4169a0], eax
call fcn.0040c85a
mov dword [0x415110], eax
call fcn.0040c7b8
test eax, eax
jge 0x40733e
push 8
call fcn.004071ca
pop ecx
call fcn.0040c585
test eax, eax
jge 0x40734f
push 9
call fcn.004071ca
pop ecx
push 1
call fcn.0040b97f
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x407365
push eax
call fcn.004071ca
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040c528
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x407386
movzx eax, word [ebp - 0x40]
jmp 0x407389
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00404c60
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4073a7
push edi
call fcn.0040baac
call fcn.0040bace
jmp 0x4073d9
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004086c7
ret
Function at 0x409705
Capabilities:
Get common file path

Disassembly:
push 0x120
push 0x410f80
call fcn.0040868c
mov eax, dword [0x414110]
mov dword [ebp - 0x1c], eax
lea edi, [ebp - 0x124]
and dword [ebp - 0x128], 0
mov eax, edi
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
mov dword [ebp - 0x12c], esi
cmp esi, 0x104
jle 0x4097a9
and dword [ebp - 4], 0
lea eax, [esi + 1]
add eax, 3
and eax, 0xfffffffc
call fcn.00406af0
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x130], edi
jmp 0x409796
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x4097a9
push edi
inc esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
xor ebx, ebx
test esi, esi
je 0x4097c4
cmp byte [edi + 1], 0x3a
jne 0x4097c4
movzx eax, byte [edi]
push eax
call fcn.0040e354
pop ecx
mov ebx, eax
sub ebx, 0x40
cmp dword [ebp - 0x128], 0
je 0x4097d4
push edi
call fcn.004091ad
pop ecx
mov eax, ebx
lea esp, [ebp - 0x13c]
mov ecx, dword [ebp - 0x1c]
call fcn.004054c0
call fcn.004086c7
ret
Function at 0x40a2b3
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x414110]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x40a2e4
xor eax, eax
jmp 0x40a46d
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x415640]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40a320
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0040e555
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40a3fb
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40a439
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x40a384
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40a375
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x40a355
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a3c4
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40a3cd
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40a346
jmp 0x40a3cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40a468
cmp dword [ebp - 0x6c], edi
je 0x40a439
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40a42e
call fcn.004094c8
mov dword [eax], 9
call fcn.004094d1
mov dword [eax], esi
jmp 0x40a463
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a423
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40a3cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40a3cf
push dword [ebp - 0x6c]
call fcn.004094da
pop ecx
jmp 0x40a463
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40a451
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40a451
xor eax, eax
jmp 0x40a46b
call fcn.004094c8
mov dword [eax], 0x1c
call fcn.004094d1
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40a46b
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.004054c0
add ebp, 0x3a0
leave
ret