joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4016f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esi + 0x2c]
push edi
lea esp, [esp]
mov edi, dword [esi + 0x3c]
sub edi, dword [esi + 0x74]
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x2c]
sub edi, eax
lea edx, [ecx + ebp - 0x106]
mov dword [esp + 0xc], edi
cmp eax, edx
jb 0x401780
mov eax, dword [esi + 0x38]
push ebp
lea ecx, [eax + ebp]
push ecx
push eax
call fcn.00408cc0
mov edx, dword [esi + 0x4c]
mov eax, dword [esi + 0x44]
sub dword [esi + 0x70], ebp
sub dword [esi + 0x6c], ebp
add esp, 0xc
sub dword [esi + 0x5c], ebp
lea ecx, [eax + edx*2]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebp
jb 0x40174f
sub eax, ebp
jmp 0x401751
xor eax, eax
sub edx, 1
mov word [ecx], ax
jne 0x401740
mov ecx, dword [esi + 0x40]
mov edx, ebp
lea ecx, [ecx + ebp*2]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebp
jb 0x401770
sub eax, ebp
jmp 0x401772
xor eax, eax
sub edx, 1
mov word [ecx], ax
jne 0x401761
add edi, ebp
mov dword [esp + 0xc], edi
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x4018b2
mov edx, dword [esi + 0x74]
add edx, dword [esi + 0x6c]
mov eax, dword [edi + 4]
add edx, dword [esi + 0x38]
mov ecx, dword [esp + 0xc]
mov ebx, eax
mov dword [esp + 0x10], edx
cmp ebx, ecx
jbe 0x4017a8
mov ebx, ecx
test ebx, ebx
je 0x4017fc
sub eax, ebx
mov dword [edi + 4], eax
mov eax, dword [edi + 0x1c]
mov eax, dword [eax + 0x18]
cmp eax, 1
jne 0x4017ca
mov edx, dword [edi]
mov ecx, dword [edi + 0x30]
mov eax, ebx
call section..text
jmp 0x4017e3
cmp eax, 2
jne 0x4017ea
mov ecx, dword [edi]
mov eax, dword [edi + 0x30]
test ecx, ecx
jne 0x4017dc
xor eax, eax
jmp 0x4017e7
mov edx, ebx
call fcn.00401260
mov edx, dword [esp + 0x10]
mov dword [edi + 0x30], eax
mov ecx, dword [edi]
push ebx
push ecx
push edx
call fcn.00408cc0
add dword [edi], ebx
add esp, 0xc
add dword [edi + 8], ebx
add dword [esi + 0x74], ebx
mov ebx, dword [esi + 0x74]
cmp ebx, 3
jb 0x401826
mov eax, dword [esi + 0x38]
mov edx, dword [esi + 0x6c]
mov ecx, dword [esi + 0x58]
add edx, eax
movzx eax, byte [edx]
mov dword [esi + 0x48], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [esi + 0x54]
mov dword [esi + 0x48], eax
cmp ebx, 0x106
jae 0x40183a
mov edx, dword [esi]
cmp dword [edx + 4], 0
jne 0x401700
mov eax, dword [esi + 0x16c0]
mov ecx, dword [esi + 0x3c]
cmp eax, ecx
jae 0x4018b2
mov edi, dword [esi + 0x6c]
add edi, ebx
cmp eax, edi
jae 0x401881
sub ecx, edi
mov ebx, ecx
cmp ebx, 0x102
jbe 0x401861
mov ebx, 0x102
mov eax, dword [esi + 0x38]
push ebx
add eax, edi
push 0
push eax
call fcn.00408430
add esp, 0xc
add ebx, edi
pop edi
pop ebp
mov dword [esi + 0x16c0], ebx
pop ebx
add esp, 8
ret
lea edx, [edi + 0x102]
cmp eax, edx
jae 0x4018b2
sub edi, eax
add edi, 0x102
sub ecx, eax
cmp edi, ecx
jbe 0x40189b
mov edi, ecx
mov ecx, dword [esi + 0x38]
push edi
add ecx, eax
push 0
push ecx
call fcn.00408430
add esp, 0xc
add dword [esi + 0x16c0], edi
pop edi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x403980
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x34c
mov eax, dword [0x416174]
xor eax, esp
mov dword [esp + 0x344], eax
mov eax, dword [esp + 0x350]
push ebx
push ebp
mov ebp, dword [esp + 0x35c]
push esi
push edi
push 0
mov dword [esp + 0x24], eax
mov dword [ebp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x24], eax
test eax, eax
je 0x403b53
push 0x104
lea ecx, [esp + 0x14c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea edx, [esp + 0x160]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403a0d
or dword [0x417b54], 0x100
jmp 0x403b53
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push edi
call ebx
cmp eax, 0xffffffff
jne 0x403a30
or dword [0x417b54], 0x200
jmp 0x403b4c
push 0
lea eax, [esp + 0x1c]
push eax
push 2
lea ecx, [esp + 0x20]
push ecx
push edi
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403a21
cmp dword [esp + 0x18], 2
jne 0x403a21
mov ax, word [esp + 0x14]
cmp al, 0x4d
jne 0x403b42
cmp ah, 0x5a
jne 0x403b42
push 0
push 0
push 0x3c
push edi
call ebx
cmp eax, 0xffffffff
je 0x403a21
mov esi, 4
lea ecx, [esp + 0x1c]
mov edx, edi
call fcn.00403950
test eax, eax
jne 0x403a21
mov edx, dword [esp + 0x1c]
push eax
push eax
push edx
push edi
call ebx
cmp eax, 0xffffffff
je 0x403a21
mov esi, 0xf8
lea ecx, [esp + 0x28]
mov edx, edi
call fcn.00403950
test eax, eax
jne 0x403a21
mov ecx, dword [esp + 0x1c]
push eax
push eax
movzx eax, word [esp + 0x44]
lea edx, [eax + ecx + 0x18]
push edx
push edi
call ebx
cmp eax, 0xffffffff
je 0x403a21
xor eax, eax
xor ebx, ebx
cmp ax, word [esp + 0x2e]
jae 0x403b4c
mov edi, edi
mov esi, 0x28
lea ecx, [esp + 0x120]
mov edx, edi
call fcn.00403950
test eax, eax
jne 0x403a21
mov edx, dword [esp + 0x20]
push 8
lea ecx, [esp + 0x124]
push ecx
push edx
call fcn.00404a6b
add esp, 0xc
test eax, eax
je 0x403b22
movzx eax, word [esp + 0x2e]
inc ebx
cmp ebx, eax
jl 0x403ae0
jmp 0x403b4c
mov ecx, dword [esp + 0x12c]
mov edx, dword [esp + 0x24]
mov eax, dword [ecx + edx]
lea esi, [ecx + edx]
push edi
mov dword [ebp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 4]
jmp 0x403b55
or dword [0x417b54], 0x400
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x354]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040467c
add esp, 0x34c
ret

Function at 0x403b70
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
push 0
push 0x100
push 2
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x403b9a
mov eax, 2
pop esi
pop ecx
ret
mov edx, dword [esp + 0xc]
push 0
lea ecx, [esp + 8]
push ecx
push edi
push edx
push esi
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403bcc
cmp dword [esp + 4], edi
jne 0x403bcc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop esi
pop ecx
ret
Function at 0x403be0
Capabilities:
Create process on windows
Delete file
Get common file path

Disassembly:
mov eax, 0x12ac
call fcn.00407f60
mov eax, dword [0x416174]
xor eax, esp
mov dword [esp + 0x12a8], eax
cmp byte [0x417b4b], 0
push ebx
push esi
push edi
mov esi, ecx
mov ebx, edx
mov edi, str._dontopenie__showwelcomepagetrue
jne 0x403c12
mov edi, 0x4145dc
cmp byte [0x417b48], 0
mov edx, str._StartPageTRUE
jne 0x403c25
mov edx, str._StartPageFALSE
cmp byte [0x417b4d], 0
mov ecx, str._DefaultSearchTRUE
jne 0x403c38
mov ecx, str._DefaultSearchFALSE
cmp byte [0x417b4a], 0
mov eax, str._OpenUninstallPageTRUE
jne 0x403c4b
mov eax, str._openUninstallpageFALSE
push edi
push edx
push ecx
push eax
push str._s__silent__s__s__s__s
lea eax, [esp + 0x48c]
push 0x30c
push eax
call fcn.00404b2b
add esp, 0x1c
lea ecx, [esp + 0x270]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edx, [esp + 0x68]
push edx
push 0
push esi
lea eax, [esp + 0x27c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [esp + 0x68]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x403ca0
mov ecx, dword [str..exe]
mov edx, dword [0x414710]
mov edi, dword [esp + 0x12bc]
mov dword [eax], ecx
mov cx, word [0x414714]
mov dword [eax + 4], edx
mov word [eax + 8], cx
push ebx
lea eax, [esp + 0x6c]
call fcn.00403b70
add esp, 4
test eax, eax
je 0x403cff
or dword [0x417b54], 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x12a8]
xor ecx, esp
call fcn.0040467c
add esp, 0x12ac
ret
xor eax, eax
push 0x44
push eax
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
call fcn.00408430
lea ecx, [esp + 0x484]
push ecx
lea edx, [esp + 0x78]
push edx
xor eax, eax
push str.__s___s
mov word [esp + 0x68], ax
lea eax, [esp + 0xaa8]
push 0x410
push eax
mov dword [esp + 0x40], 0x44
mov dword [esp + 0x6c], 1
call fcn.00404b2b
add esp, 0x20
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x278]
push eax
push 0
push 0x8004000
push 0
push 0
push 0
lea ecx, [esp + 0xab0]
push ecx
lea edx, [esp + 0x8c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x403dd5
mov ebx, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esp + 0xc], 0
xor esi, esi
jmp 0x403db0
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0xc]
push eax
push ecx
call ebx
cmp dword [esp + 0xc], 0x103
jne 0x403ddf
push 0x3e8
call edi
inc esi
cmp esi, 0x1e
jl 0x403db0
jmp 0x403ddf
or dword [0x417b54], 0x800
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0x12b4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040467c
add esp, 0x12ac
ret
Function at 0x403f50
Capabilities:
Accept command line arguments

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
lea ecx, [esp]
push ecx
mov dword [esp + 4], 0
call fcn.00403e20
mov edx, dword [esp + 4]
push eax
push edx
call fcn.00404050
add esp, 0x10
ret 0x10

Function at 0x403f80
Capabilities:
Set registry value

Disassembly:
sub esp, 0x10c
mov eax, dword [0x416174]
xor eax, esp
mov dword [esp + 0x108], eax
mov eax, dword [esp + 0x110]
push eax
push str.SoftwareConduitAppPaths_s_
lea eax, [esp + 0xc]
push 0x104
push eax
call fcn.00404cce
add esp, 0x10
push 0
lea ecx, [esp + 4]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
lea edx, [esp + 0x20]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x403ffa
or dword [0x417b54], 0x4000
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.0040467c
add esp, 0x10c
ret
mov eax, esi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404000
sub eax, edx
inc eax
push eax
mov eax, dword [esp + 4]
push esi
push 1
push 0
push str.AppPath
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40402e
or dword [0x417b54], 0x8000
mov ecx, dword [esp]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.0040467c
add esp, 0x10c
ret
Function at 0x40467c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x416174]
jne 0x404686
repz ret
jmp fcn.00404f2e

Function at 0x40bc35
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00407558
and dword [ebp - 4], 0
cmp dword [0x417a5c], 0
mov ebx, eax
jne 0x40bce6
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40bd97
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x40bd97
push eax
call fcn.004074e6
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x417a5c], eax
call esi
push eax
call fcn.004074e6
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x417a60], eax
call esi
push eax
call fcn.004074e6
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x417a64], eax
call esi
push eax
call fcn.004074e6
pop ecx
mov dword [0x417a6c], eax
test eax, eax
je 0x40bce6
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004074e6
pop ecx
mov dword [0x417a68], eax
mov eax, dword [0x417a68]
cmp eax, ebx
je 0x40bd3e
cmp dword [0x417a6c], ebx
je 0x40bd3e
push eax
call fcn.00407561
push dword [0x417a6c]
mov esi, eax
call fcn.00407561
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40bd3e
test edi, edi
je 0x40bd3e
call esi
test eax, eax
je 0x40bd35
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40bd35
test byte [ebp - 0xc], 1
jne 0x40bd3e
or dword [ebp + 0x10], 0x200000
jmp 0x40bd77
mov eax, dword [0x417a60]
cmp eax, ebx
je 0x40bd77
push eax
call fcn.00407561
pop ecx
test eax, eax
je 0x40bd77
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40bd77
mov eax, dword [0x417a64]
cmp eax, ebx
je 0x40bd77
push eax
call fcn.00407561
pop ecx
test eax, eax
je 0x40bd77
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x417a5c]
call fcn.00407561
pop ecx
test eax, eax
je 0x40bd97
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40bd99
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407010
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x40704e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x407046
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x407050
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x407036
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x407120
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x407151
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407151
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x407151
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret

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

Disassembly:
pushal
call 0x43300c
pop eax
nop
nop
nop
nop
nop
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
nop
nop
nop
nop
mov ebx, dword [eax]
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
nop
jl 0x433030
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x4026e0
Capabilities:
Suspend thread

Disassembly:
push ecx
push esi
mov esi, ecx
mov ecx, dword [esi + 0xb0]
mov eax, dword [ecx]
cmp eax, ecx
mov dword [esp + 4], eax
je 0x402724
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SuspendThread]
push edi
mov edi, dword [esp + 0x14]
cmp dword [eax + 0xc], edi
je 0x40270b
mov eax, dword [eax + 0x10]
push eax
call ebx
lea ecx, [esp + 0xc]
call fcn.00403430
mov ecx, dword [esi + 0xb0]
mov eax, dword [esp + 0xc]
cmp eax, ecx
jne 0x402700
pop edi
pop ebx
pop esi
pop ecx
ret 4

Function at 0x402730
Capabilities:
Resume thread

Disassembly:
push ecx
push esi
mov esi, ecx
mov ecx, dword [esi + 0xb0]
mov eax, dword [ecx]
cmp eax, ecx
mov dword [esp + 4], eax
je 0x402774
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
push edi
mov edi, dword [esp + 0x14]
cmp dword [eax + 0xc], edi
je 0x40275b
mov eax, dword [eax + 0x10]
push eax
call ebx
lea ecx, [esp + 0xc]
call fcn.00403430
mov ecx, dword [esi + 0xb0]
mov eax, dword [esp + 0xc]
cmp eax, ecx
jne 0x402750
pop edi
pop ebx
pop esi
pop ecx
ret 4
Function at 0x401c40
Capabilities:
Get file version info

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
lea eax, [esp + 0xc]
push edi
xor ebp, ebp
push eax
push ebx
mov dword [esp + 0x18], ebp
xor edi, edi
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
cmp esi, ebp
je 0x401c7f
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
cmp edi, ebp
je 0x401c7f
push edi
push esi
push ebp
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x401c95
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x401cef
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
push ecx
push edx
push str.StringFileInfo040904b0FileVersion
push edi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x24], ebp
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x401ce3
mov edi, dword [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x401c8b
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebp
jge 0x401d0e
cmp edi, ebp
je 0x401d0e
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x4036c1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x407470
cmp edx, dword [eax]
je 0x4036e3
add eax, 8
inc ecx
cmp eax, 0x407500
jl 0x4036d4
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x407470]
jne 0x403811
mov eax, dword [0x407b30]
cmp eax, 1
je 0x4037eb
test eax, eax
jne 0x403714
cmp dword [0x4071a4], 1
je 0x4037eb
cmp edx, 0xfc
je 0x403811
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40374b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00404d90
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00404e80
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40378e
lea eax, [ebp - 0x1a4]
push eax
call fcn.00404e80
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x407060
push edi
call fcn.004052c0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00404d90
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00404da0
lea eax, [ebp - 0xa0]
push 0x406430
push eax
call fcn.00404da0
push dword [esi + 0x407474]
lea eax, [ebp - 0xa0]
push eax
call fcn.00404da0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00405235
add esp, 0x2c
pop edi
jmp 0x403811
lea eax, [ebp + 8]
lea esi, [esi + 0x407474]
push 0
push eax
push dword [esi]
call fcn.00404e80
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x4014c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x401531
push ebx
call fcn.004015f0
add esp, 4
test eax, eax
jne 0x4014ff
mov dword [0x4075a4], 0xf
mov dword [0x4075a0], 0xd
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x401541
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4015d7
inc eax
cmp eax, 0x104
ja 0x4015d7
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x401590
cmp eax, ecx
jg 0x40156d
mov eax, ecx
push eax
call fcn.00401800
mov edx, eax
add esp, 4
test edx, edx
jne 0x4015aa
mov dword [0x4075a0], 0xc
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x4015aa
mov dword [0x4075a0], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret

Function at 0x4015f0
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x4015fe
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x40162d
cmp eax, 1
je 0x40162d
mov eax, 1
ret
xor eax, eax
ret
Function at 0x401630
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x4026f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x4075b8], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x4075b4], ecx
shl ecx, 8
add ecx, edx
mov dword [0x4075b0], ecx
shr eax, 0x10
mov dword [0x4075ac], eax
call fcn.004025c0
test eax, eax
jne 0x40169a
push 0x1c
call fcn.004017d0
add esp, 4
mov dword [ebp - 4], 0
call fcn.004023c0
call fcn.004023b0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x407990], eax
call fcn.00401f80
mov dword [0x407594], eax
test eax, eax
je 0x4016cd
mov eax, dword [0x407990]
test eax, eax
jne 0x4016d7
push 0xffffffffffffffff
call fcn.004018e0
add esp, 4
call fcn.00401cd0
call fcn.00401be0
call fcn.004018b0
mov esi, dword [0x407990]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x4017b6
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x40171e
test al, al
je 0x40171e
and eax, 0xff
push eax
call fcn.00401b80
add esp, 4
test eax, eax
je 0x4016f8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4016f8
cmp byte [esi], 0x22
jne 0x401727
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x401737
cmp al, 0x20
ja 0x401737
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401727
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x401758
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40175d
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 - 0x60], eax
push eax
call fcn.004018e0
jmp 0x40179b
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 0x401727
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4017b6

Function at 0x401920
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x4075e8]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40193f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x4075e4], 1
mov byte [0x4075e0], bl
jne 0x401999
mov ecx, dword [0x407988]
test ecx, ecx
je 0x401987
mov esi, dword [0x407984]
sub esi, 4
cmp esi, ecx
jb 0x401987
mov eax, dword [esi]
test eax, eax
je 0x401980
call eax
mov ecx, dword [0x407988]
sub esi, 4
cmp esi, ecx
jae 0x401972
push 0x405014
push 0x405010
call fcn.004019d0
add esp, 8
push 0x40501c
push 0x405018
call fcn.004019d0
add esp, 8
test ebx, ebx
jne 0x4019c0
push ebp
mov dword [0x4075e8], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret