joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4289ac
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
push dword [edi]
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FlushFileBuffers]
mov ecx, dword [edi]
call fcn.0040a0ab
push ecx
push ecx
xor edx, edx
mov ecx, ebx
call fcn.004164cb
mov ecx, eax
mov dword [edi], ecx
cmp ecx, 0xffffffff
je 0x428a76
mov esi, dword [ebp + 8]
mov eax, esi
push 2
push 0
neg eax
push eax
push ecx
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
push 0
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0x10]
push dword [edi]
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
je 0x428a6c
cmp dword [ebp - 4], esi
jne 0x428a6c
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call sub.msvcrt.dll_memcmp
mov ecx, dword [edi]
add esp, 0xc
mov esi, eax
call fcn.0040a0ab
test esi, esi
jne 0x428a73
push ecx
xor edx, edx
push ecx
inc edx
mov ecx, ebx
call fcn.004164cb
mov dword [edi], eax
cmp eax, 0xffffffff
je 0x428a76
push 2
push esi
push esi
push eax
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
xor eax, eax
jmp 0x428a89
mov ecx, dword [edi]
call fcn.0040a0ab
or dword [edi], 0xffffffff
push ebx
push 1
push 0x4000271f
call fcn.00407834
xor eax, eax
add esp, 0xc
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x429320
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
and dword [ebp - 0xc], 0
and dword [ebp - 0x10], 0
push ebx
push esi
push edi
push ecx
push ecx
push 2
mov dword [ebp - 8], edx
pop edx
call fcn.004164cb
mov esi, eax
cmp esi, 0xffffffff
jne 0x429359
push 0x6e
pop ecx
call fcn.00429d18
xor edx, edx
xor ecx, ecx
inc edx
call fcn.00428a90
mov ebx, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push ebx
push esi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
je 0x42940c
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov edi, eax
mov ecx, dword [edx + 0x1c]
test ecx, 0xc000
jne 0x4293b3
cmp edi, 2
jbe 0x4293aa
mov edx, 0xfeff
cmp word [ebx], dx
mov edx, dword [ebp - 8]
jne 0x4293aa
or ecx, 0x4000
jmp 0x4293b0
or ecx, 0x8000
mov dword [edx + 0x1c], ecx
test edi, edi
je 0x4293de
lea eax, [ebp - 0x10]
mov edx, ebx
push eax
lea eax, [ebp - 4]
push eax
mov eax, 0x8002
and ecx, eax
sub ecx, eax
neg ecx
sbb ecx, ecx
inc ecx
call fcn.004271ff
mov ecx, eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], ecx
jmp 0x4293e1
mov ecx, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
je 0x42935c
test ecx, ecx
jne 0x429403
push 1
push ecx
sub eax, edi
push eax
push esi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, esi
mov dword [0x435798], eax
call fcn.0040a0ab
push 0
push dword [0x435798]
call fcn.00407834
pop ecx
pop ecx
jmp 0x42934f
Function at 0x4298bd
Capabilities:
Set current directory

Disassembly:
mov edi, edi
push ebx
mov ebx, esp
push ecx
push ecx
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov eax, 0x104
mov byte [ebp - 0x1c], 1
push eax
xor edi, edi
mov dword [ebp - 0x18], eax
and dword [ebp - 0x20], edi
lea eax, [ebp - 0x228]
push edi
push eax
mov esi, ecx
call sub.msvcrt.dll_memset
xor eax, eax
lea ecx, [ebp - 0x228]
add esp, 0xc
cmp byte [ebp - 0x1c], al
sete al
dec eax
and eax, 0x7ee3
add eax, 0x104
push eax
call fcn.0040e330
test eax, eax
jns 0x429938
mov eax, dword [ebp - 0x20]
and dword [ebp - 0x20], edi
jmp 0x429a34
push 0x3d
pop eax
mov word [ebp - 0xc], ax
lea ecx, [ebp - 0xc]
lea eax, [esi + 0x40]
mov word [ebp - 0xa], ax
push 0x3a
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
call fcn.0040eb6e
mov esi, eax
test esi, esi
je 0x42997a
push esi
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetCurrentDirectoryW]
test al, al
jne 0x429a11
push 1
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetErrorMode]
mov edi, eax
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x429987
lea ecx, [ebp - 0x228]
mov ax, word [ebp - 0xa]
mov word [ecx], ax
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x42999b
lea ecx, [ebp - 0x228]
mov ax, word [ebp - 8]
mov word [ecx + 2], ax
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x4299b0
lea eax, [ebp - 0x228]
push 0x5c
pop ecx
mov word [eax + 4], cx
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x4299c4
lea eax, [ebp - 0x228]
xor ecx, ecx
mov word [eax + 6], cx
mov edx, dword [ebp - 0x20]
test edx, edx
jne 0x4299d7
lea edx, [ebp - 0x228]
lea ecx, [ebp - 0xc]
call fcn.0040a891
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x4299ec
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x429a06
push eax
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
call fcn.00407834
pop ecx
pop ecx
test esi, esi
je 0x429a11
push edi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetErrorMode]
mov ecx, dword [0x447de8]
test ecx, ecx
jne 0x429a20
mov ecx, 0x447be0
mov edx, dword [0x447df0]
push 0
call fcn.00408deb
mov eax, dword [ebp - 0x20]
and dword [ebp - 0x20], 0
test eax, eax
je 0x429a40
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00416ad0
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
Function at 0x429e2a
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov eax, 0x104
xor edi, edi
push eax
mov dword [ebp - 0x10], eax
xor ebx, ebx
lea eax, [ebp - 0x220]
mov dword [ebp - 0x224], edi
push edi
inc ebx
mov dword [ebp - 0x18], edi
push eax
mov esi, ecx
mov byte [ebp - 0x14], bl
call sub.msvcrt.dll_memset
xor eax, eax
lea ecx, [ebp - 0x220]
add esp, 0xc
cmp byte [ebp - 0x14], al
sete al
dec eax
and eax, 0xfdc6
add eax, 0x208
push eax
call fcn.0040e330
test eax, eax
js 0x429ee7
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x429e9e
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0x224]
push ecx
push eax
push dword [ebp - 0x10]
push esi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFullPathNameW]
test eax, eax
je 0x429ee7
cmp eax, 0xffce
jbe 0x429ee7
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x429ec8
lea eax, [ebp - 0x220]
xor ecx, ecx
mov word [eax + 6], cx
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x429edb
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetDriveTypeW]
cmp eax, 4
je 0x429ee9
mov ebx, edi
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x18], edi
test ecx, ecx
je 0x429efb
push ecx
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ad0
leave
ret

Function at 0x429f67
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push 0xd
push 1
lea eax, [ebp - 1]
mov byte [ebp - 1], 1
push eax
lea eax, [ebp - 0xc]
push eax
push ecx
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
xor ecx, ecx
test eax, eax
setns cl
mov eax, ecx
leave
ret
Function at 0x42a599
Capabilities:
Get disk size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov esi, edx
mov dword [ebp - 0x224], eax
mov edi, ecx
call fcn.004049df
mov ecx, 0x104
xor eax, eax
push ecx
push eax
mov dword [ebp - 0x18], eax
xor ebx, ebx
lea eax, [ebp - 0x220]
mov dword [ebp - 0x10], ecx
inc ebx
push eax
mov byte [ebp - 0x14], bl
call sub.msvcrt.dll_memset
xor eax, eax
lea ecx, [ebp - 0x220]
add esp, 0xc
cmp byte [ebp - 0x14], al
sete al
dec eax
and eax, 0x7ee3
add eax, 0x104
push eax
call fcn.0040e330
test eax, eax
js 0x42a6e9
push esi
lea ecx, [ebp - 0x220]
call fcn.0040a586
mov eax, dword [ebp - 0x18]
mov ecx, eax
test eax, eax
jne 0x42a629
lea ecx, [ebp - 0x220]
xor ebx, ebx
cmp word [ecx], bx
je 0x42a650
cmp word [ecx + 2], 0x3a
jne 0x42a650
cmp word [ecx + 4], bx
jne 0x42a650
push 0x4024fc
lea ecx, [ebp - 0x220]
call fcn.004122ac
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x230], ebx
test eax, eax
jne 0x42a666
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0x238]
push ecx
lea ecx, [ebp - 0x240]
push ecx
lea ecx, [ebp - 0x230]
push ecx
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetDiskFreeSpaceExW]
push 6
pop edx
mov ecx, edi
call fcn.00427ef1
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x42a699
lea eax, [ebp - 0x220]
push dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x230]
push eax
push 0xe
call fcn.0042b160
mov esi, dword [ebp - 0x18]
test esi, esi
jne 0x42a6ba
lea esi, [ebp - 0x220]
push dword [ebp - 0x224]
mov ebx, 0x447e20
push 0x403f44
push 0x104
push ebx
call fcn.004099ff
push esi
push ebx
push 2
push 0x2379
push edi
call fcn.0042816a
add esp, 0x24
mov ebx, eax
mov ecx, dword [ebp - 0x18]
and dword [ebp - 0x18], 0
test ecx, ecx
je 0x42a6fc
push ecx
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ad0
leave
ret 8
Function at 0x42b524
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], edx
xor edi, edi
mov dword [ebp - 8], ebx
push edi
call dword [sym.imp.api_ms_win_core_winrt_l1_1_0.dll_RoInitialize]
mov esi, eax
test esi, esi
js 0x42b625
mov dword [ebp - 4], edi
call dword [sym.imp.api_ms_win_core_kernel32_legacy_l1_1_0.dll_GetConsoleWindow]
lea ecx, [ebp - 4]
mov dword [ebp - 0xc], eax
call fcn.0042b6cb
lea eax, [ebp - 8]
push eax
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp + 0x14]
push eax
lea edx, [ebp - 0xc]
lea ecx, [ebp - 4]
call fcn.0042b42c
test eax, eax
js 0x42b613
call fcn.00408185
push 0x38
lea eax, [ebp - 0x48]
mov dword [ebp - 0x4c], 0x3c
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x48], 0x8008140
test bl, 0x10
je 0x42b5ab
mov dword [ebp - 0x48], 0x8000140
call dword [sym.imp.api_ms_win_core_kernel32_legacy_l1_1_0.dll_GetConsoleWindow]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.ext_ms_win_shell_shell32_l1_2_0.dll_ShellExecuteExW]
mov edi, eax
test edi, edi
je 0x42b5ec
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ebp - 0x14]
mov dword [ecx], eax
jmp 0x42b613
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x42b5ff
mov dword [0x435798], 8
jmp 0x42b613
mov dword [0x435798], 2
cmp eax, 0x20
je 0x42b613
mov dword [0x435798], eax
lea ecx, [ebp - 4]
call fcn.0042b6cb
test esi, esi
js 0x42b625
call dword [sym.imp.api_ms_win_core_winrt_l1_1_0.dll_RoUninitialize]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0x1c
Function at 0x42c33e
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x220]
push ebx
push esi
push edi
mov edi, 0x104
xor ebx, ebx
push edi
push 0
inc ebx
mov dword [ebp - 0x10], edi
push eax
mov esi, ecx
mov byte [ebp - 0x14], bl
call sub.msvcrt.dll_memset
xor eax, eax
lea ecx, [ebp - 0x220]
add esp, 0xc
cmp byte [ebp - 0x14], al
sete al
dec eax
and eax, 0x7ee3
add eax, edi
push eax
call fcn.0040e330
test eax, eax
js 0x42c3d7
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x42c3a9
lea eax, [ebp - 0x220]
push dword [ebp - 0x10]
push eax
push esi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetVolumePathNameW]
test eax, eax
je 0x42c3d5
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x42c3c5
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetDriveTypeW]
test eax, eax
je 0x42c3d5
cmp eax, 4
jne 0x42c3d7
xor ebx, ebx
mov eax, dword [ebp - 0x18]
and dword [ebp - 0x18], 0
test eax, eax
je 0x42c3ea
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ad0
leave
ret
Function at 0x42c3fb
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov eax, 0x104
mov byte [ebp - 0x439], dl
push eax
xor edi, edi
mov dword [ebp - 0x10], eax
xor ebx, ebx
mov dword [ebp - 0x18], edi
lea eax, [ebp - 0x220]
inc ebx
push edi
push eax
mov esi, ecx
mov byte [ebp - 0x14], bl
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x230], edi
mov eax, 0x104
mov byte [ebp - 0x22c], bl
mov dword [ebp - 0x228], eax
push eax
lea eax, [ebp - 0x438]
push edi
push eax
call sub.msvcrt.dll_memset
xor eax, eax
lea ecx, [ebp - 0x220]
add esp, 0xc
cmp byte [ebp - 0x14], al
sete al
dec eax
and eax, 0x7ee3
add eax, 0x104
push eax
call fcn.0040e330
test eax, eax
js 0x42c5ab
xor eax, eax
lea ecx, [ebp - 0x438]
cmp byte [ebp - 0x22c], al
sete al
dec eax
and eax, 0x7ee3
add eax, 0x104
push eax
call fcn.0040e330
test eax, eax
js 0x42c5ab
mov eax, dword [ebp - 0x230]
test eax, eax
jne 0x42c4c8
lea eax, [ebp - 0x438]
push dword [ebp - 0x228]
push eax
push esi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetVolumePathNameW]
test eax, eax
je 0x42c5ab
mov eax, dword [ebp - 0x230]
test eax, eax
jne 0x42c4ee
lea eax, [ebp - 0x438]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetDriveTypeW]
test eax, eax
je 0x42c5a9
cmp eax, 4
je 0x42c5a9
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x42c513
lea eax, [ebp - 0x220]
mov ecx, dword [ebp - 0x230]
test ecx, ecx
jne 0x42c523
lea ecx, [ebp - 0x438]
push dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x440]
push eax
push eax
push edi
push edi
push edi
push ecx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetVolumeInformationW]
test eax, eax
je 0x42c5ab
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x42c54a
lea eax, [ebp - 0x220]
push 0x40408c
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x42c5ab
cmp byte [ebp + 8], 0
je 0x42c581
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x42c56f
lea eax, [ebp - 0x220]
push 0x404098
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x42c5ab
cmp byte [ebp - 0x439], 0
je 0x42c5a9
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x42c597
lea eax, [ebp - 0x220]
push 0x4040a4
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x42c5ab
mov ebx, edi
mov eax, dword [ebp - 0x230]
mov dword [ebp - 0x230], edi
test eax, eax
je 0x42c5c3
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], edi
test eax, eax
je 0x42c5d5
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ad0
leave
ret 4
Function at 0x401000
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x401044
xor eax, eax
jmp 0x40106c
push 0
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x403231
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4070f8
cmp edx, dword [eax]
je 0x403253
add eax, 8
inc ecx
cmp eax, 0x407188
jl 0x403244
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4070f8]
jne 0x403381
mov eax, dword [0x4078d8]
cmp eax, 1
je 0x40335b
test eax, eax
jne 0x403284
cmp dword [0x407044], 1
je 0x40335b
cmp edx, 0xfc
je 0x403381
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4032bb
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00403900
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004036f0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4032fe
lea eax, [ebp - 0x1a4]
push eax
call fcn.004036f0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40644c
push edi
call fcn.00404720
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00403900
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00403910
lea eax, [ebp - 0xa0]
push 0x40642c
push eax
call fcn.00403910
push dword [esi + 0x4070fc]
lea eax, [ebp - 0xa0]
push eax
call fcn.00403910
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040468d
add esp, 0x2c
pop edi
jmp 0x403381
lea eax, [ebp + 8]
lea esi, [esi + 0x4070fc]
push 0
push eax
push dword [esi]
call fcn.004036f0
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 0x418a80
Capabilities:
Create thread

Disassembly:
push esi
lea eax, [esp + 8]
push eax
push 0
mov esi, ecx
mov ecx, dword [esp + 0x10]
push ecx
push edx
push 0
push 0
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
mov dword [esi], eax
pop esi
test eax, eax
je 0x418aa9
xor eax, eax
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x418ab8
mov eax, 1
ret 4

Function at 0x1000125c
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov dword [ebp - 0xc], 0
call sub.KERNEL32.DLL_GetEnvironmentStringsA
mov ebx, eax
mov dword [ebp - 0x10], ebx
jmp 0x10001299
cmp byte [ebx], 0x3d
je 0x10001285
inc dword [ebp - 0xc]
mov edi, ebx
xor eax, eax
stc
sbb ecx, ecx
repne scasb al, byte es:[edi]
neg ecx
lea eax, [ecx - 2]
mov edi, eax
inc edi
lea ebx, [ebx + edi]
cmp byte [ebx], 0
jne 0x10001278
mov edi, dword [ebp - 0xc]
inc edi
lea edi, [edi*4]
mov dword [ebp - 0x14], edi
push dword [ebp - 0x14]
call sub.CRTDLL.DLL_malloc
pop ecx
mov dword [ebp - 8], eax
mov dword [0x10003010], eax
cmp dword [ebp - 8], 0
jne 0x100012cc
xor eax, eax
jmp 0x10001342
mov ebx, dword [ebp - 0x10]
jmp 0x10001325
mov edi, ebx
xor eax, eax
stc
sbb ecx, ecx
repne scasb al, byte es:[edi]
neg ecx
lea eax, [ecx - 2]
mov edi, eax
inc edi
mov dword [ebp - 4], edi
cmp byte [ebx], 0x3d
je 0x1000131f
push dword [ebp - 4]
call sub.CRTDLL.DLL_malloc
pop ecx
mov esi, dword [ebp - 8]
mov dword [esi], eax
or eax, eax
jne 0x10001308
jmp 0x10001342
push ebx
mov edi, dword [ebp - 8]
push dword [edi]
call sub.CRTDLL.DLL_strcpy
add esp, 8
add dword [ebp - 8], 4
mov edx, dword [ebp - 4]
lea ebx, [ebx + edx]
cmp byte [ebx], 0
jne 0x100012d1
mov edx, dword [ebp - 8]
mov dword [edx], 0
mov eax, 1
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401220
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push str.PYTHONSCRIPT
push 1
push edi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
cmp byte [0x406460], 0
mov esi, eax
jne 0x401248
push edi
call fcn.00401180
add esp, 4
test esi, esi
jne 0x401265
push str.Could_not_locate_script_resource:
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call section..text
add esp, 8
pop edi
xor eax, eax
pop esi
ret
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
test eax, eax
jne 0x40128a
push str.Could_not_load_script_resource:
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call section..text
add esp, 8
pop edi
xor eax, eax
pop esi
ret
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov dword [0x406564], eax
mov dword [0x40668c], eax
test eax, eax
jne 0x4012b8
push str.Could_not_lock_script_resource:
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call section..text
add esp, 8
pop edi
xor eax, eax
pop esi
ret
mov ecx, dword [eax + 0xc]
mov dword [0x406684], ecx
lea ecx, [eax + 0x10]
mov dword [0x406564], ecx
cmp dword [eax], 0x78563412
je 0x4012e6
push str.Bug:_Invalid_script_resource
push 0
call section..text
add esp, 8
pop edi
xor eax, eax
pop esi
ret
mov eax, ecx
lea esi, [eax + 1]
jmp 0x4012f0
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4012f0
sub eax, esi
lea edx, [ecx + eax + 1]
mov dword [0x406564], edx
cmp byte [ecx], 0
je 0x40132e
push ecx
push 0x406460
push 0x4050f4
push 0x304
push 0x405e20
call dword [sym.imp.MSVCR90.dll__snprintf]
add esp, 0x14
pop edi
mov eax, 1
pop esi
ret
push 0x304
push 0x405e20
push edi
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
pop edi
mov eax, 1
pop esi
ret

Function at 0x401350
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ecx
push esi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401377
xor eax, eax
pop esi
pop ecx
ret
push ebx
push edi
lea ecx, [esp + 0xc]
push ecx
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
push 0
push 0
push 0
push 2
push 0
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingA]
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edi, eax
call esi
cmp edi, 0xffffffff
jne 0x4013af
pop edi
pop ebx
xor eax, eax
pop esi
pop ecx
ret
push ebp
push 0
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
push edi
mov ebp, eax
call esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4013ce
mov dword [eax], ebx
mov eax, ebp
pop ebp
pop edi
pop ebx
pop esi
pop ecx
ret