joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404540
Capabilities:
Delete directory

Disassembly:
sub esp, 0x104
push esi
mov esi, dword [esp + 0x10c]
test esi, esi
jne 0x40455f
mov eax, 0xffffd846
pop esi
add esp, 0x104
ret
push esi
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::Len_char_const__
add esp, 4
cmp eax, 0x103
jle 0x40457c
mov eax, 0xffffd845
pop esi
add esp, 0x104
ret
lea eax, [esp + 4]
push esi
push eax
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::Copy_char___char_const__
add esp, 8
lea ecx, [esp + 4]
push ecx
call sym.mkss.exe_public:_static_void___cdecl_MSFS::StripSlash_char__
add esp, 4
lea edx, [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x4045b8
push 0xffffffffffffffff
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop esi
add esp, 0x104
ret
xor eax, eax
pop esi
add esp, 0x104
ret

Function at 0x404730
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40474a
test al, 0x10
jne 0x40474a
mov eax, 1
ret
xor eax, eax
ret

Function at 0x404750
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x404780
push esi
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::Len_char_const__
add esp, 4
cmp eax, 0x103
jg 0x404780
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404780
test al, 0x10
je 0x404780
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x404b50
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x404b69
push eax
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
ret

Function at 0x404c60
Capabilities:
Get common file path

Disassembly:
sub esp, 0x308
push esi
mov esi, dword [esp + 0x310]
test esi, esi
jne 0x404c7f
mov eax, 0xffffd846
pop esi
add esp, 0x308
ret
lea eax, [esp + 4]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x404cd5
lea ecx, [esp + 0x108]
lea edx, [esp + 0x208]
push ecx
push edx
lea eax, [esp + 0xc]
push 0
push eax
call sym.mkss.exe_public:_static_int___cdecl_MSFS::ParsePath_char_const___char___char___char__
add esp, 0x10
lea ecx, [esp + 0x108]
lea edx, [esp + 0x208]
push ecx
push edx
push esi
call sym.mkss.exe_public:_static_int___cdecl_MSFS::AppendPath_char___char_const___char_const__
add esp, 0xc
xor eax, eax
pop esi
add esp, 0x308
ret
push 0xffffffffffffffff
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop esi
add esp, 0x308
ret

Function at 0x404e60
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x404e7f
push 0xffffffffffffffff
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
ret
xor eax, eax
ret
Function at 0x404f00
Capabilities:
Set file attributes

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x404f0e
mov eax, 0xffffd846
ret
mov ecx, dword [esp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp eax, 1
jne 0x404f22
xor eax, eax
ret
push 0xffffffffffffffff
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
ret

Function at 0x404f30
Capabilities:
Timestomp file

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x24]
push esi
push 0
push pe_nt_image_headers32
push 3
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x405025
mov eax, dword [esp + 0x2c]
xor cx, cx
mov cl, al
xor dx, dx
dec ecx
mov dl, ah
movzx ax, byte [esp + 0x2e]
mov word [esp + 0x18], cx
mov word [esp + 0x16], ax
movzx cx, byte [esp + 0x2f]
add ecx, 0x76c
mov word [esp + 0x1a], dx
mov word [esp + 0x14], cx
mov ecx, dword [esp + 0x30]
xor ax, ax
xor dx, dx
mov al, cl
mov dl, ch
movzx cx, byte [esp + 0x32]
lea eax, [eax + eax*4]
mov word [esp + 0x20], dx
movzx dx, byte [esp + 0x33]
shl eax, 1
cmp ax, 0x3e8
mov word [esp + 0x22], ax
mov word [esp + 0x1e], cx
mov word [esp + 0x1c], dx
jb 0x404fd1
mov word [esp + 0x22], 0x3e7
lea eax, [esp + 4]
lea ecx, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x40501e
lea edx, [esp + 0xc]
lea eax, [esp + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x40501e
push 0
lea ecx, [esp + 0x10]
push 0
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
push esi
je 0x40501f
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop esi
add esp, 0x20
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop esi
add esp, 0x20
ret

Function at 0x405040
Capabilities:
Set current directory

Disassembly:
sub esp, 0x104
push esi
mov esi, dword [esp + 0x10c]
test esi, esi
jne 0x40505f
mov eax, 0xffffd846
pop esi
add esp, 0x104
ret
push esi
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::Len_char_const__
add esp, 4
cmp eax, 0x103
jle 0x40507c
mov eax, 0xffffd845
pop esi
add esp, 0x104
ret
lea eax, [esp + 4]
push esi
push eax
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::Copy_char___char_const__
add esp, 8
lea ecx, [esp + 4]
push ecx
call sym.mkss.exe_public:_static_void___cdecl_MSFS::StripSlash_char__
add esp, 4
lea edx, [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp eax, 1
jne 0x4050b1
xor eax, eax
pop esi
add esp, 0x104
ret
push 0xffffffffffffffff
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop esi
add esp, 0x104
ret
Function at 0x4050d0
Capabilities:
Timestomp file

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x24]
push esi
push 0
push pe_nt_image_headers32
push 3
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4051c5
mov eax, dword [esp + 0x2c]
xor cx, cx
mov cl, al
xor dx, dx
dec ecx
mov dl, ah
movzx ax, byte [esp + 0x2e]
mov word [esp + 0x18], cx
mov word [esp + 0x16], ax
movzx cx, byte [esp + 0x2f]
add ecx, 0x76c
mov word [esp + 0x1a], dx
mov word [esp + 0x14], cx
mov ecx, dword [esp + 0x30]
xor ax, ax
xor dx, dx
mov al, cl
mov dl, ch
movzx cx, byte [esp + 0x32]
lea eax, [eax + eax*4]
mov word [esp + 0x20], dx
movzx dx, byte [esp + 0x33]
shl eax, 1
cmp ax, 0x3e8
mov word [esp + 0x22], ax
mov word [esp + 0x1e], cx
mov word [esp + 0x1c], dx
jb 0x405171
mov word [esp + 0x22], 0x3e7
lea eax, [esp + 4]
lea ecx, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x4051be
lea edx, [esp + 0xc]
lea eax, [esp + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x4051be
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
push esi
je 0x4051bf
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop esi
add esp, 0x20
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop esi
add esp, 0x20
ret

Function at 0x4056c0
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x4056ce
mov eax, 0xffffd846
ret
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4056e1
xor eax, eax
ret
push 0xffffffffffffffff
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
ret

Function at 0x4062c0
Capabilities:
Get disk size

Disassembly:
sub esp, 0xc
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
lea edx, [esp]
push eax
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xc]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x4062ed
or eax, 0xffffffff
add esp, 0xc
ret
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
imul edx, dword [esp]
imul edx, dword [esp + 4]
mov dword [eax], edx
xor eax, eax
add esp, 0xc
ret
Function at 0x406310
Capabilities:
Get disk size

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x406324
or eax, 0xffffffff
pop esi
add esp, 0xc
ret
mov al, byte [0x41c9b4]
push edi
test al, al
jne 0x40634c
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.GetDiskFreeSpaceExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41c9b0], eax
jmp 0x406351
mov eax, dword [0x41c9b0]
test eax, eax
je 0x406373
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0xc]
push 0
push ecx
push esi
push edx
call eax
mov edi, eax
neg eax
sbb eax, eax
pop edi
neg eax
dec eax
pop esi
add esp, 0xc
ret
lea eax, [esp + 0xc]
lea ecx, [esp + 8]
push eax
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x20]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
mov edi, eax
test edi, edi
je 0x4063b3
mov eax, dword [esp + 0x18]
mul dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0xc]
push eax
push 0
push edx
call fcn.0040bfc0
mov dword [esi], eax
mov dword [esi + 4], edx
mov eax, edi
pop edi
neg eax
sbb eax, eax
pop esi
neg eax
dec eax
add esp, 0xc
ret
Function at 0x406a80
Capabilities:
Enumerate network shares

Disassembly:
sub esp, 0x714
lea eax, [esp + 4]
push ebx
push esi
push edi
push eax
push 0
mov ebx, 1
push 0
push ebx
push ebx
call sub.MPR.dll_WNetOpenEnumA
test eax, eax
je 0x406ab1
mov eax, 0xffff8001
pop edi
pop esi
pop ebx
add esp, 0x714
ret
mov esi, dword [esp + 0x724]
lea ecx, [esp + 0x11c]
lea edx, [esp + 0x21c]
push ecx
push edx
push 0
push esi
call sym.mkss.exe_public:_static_int___cdecl_MSFS::ParsePath_char_const___char___char___char__
add esp, 0x10
lea eax, [esp + 0x14]
lea ecx, [esp + 0x320]
lea edx, [esp + 0xc]
push eax
mov eax, dword [esp + 0x14]
push ecx
mov edi, 0x400
push edx
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], edi
call sub.MPR.dll_WNetEnumResourceA
test eax, eax
jne 0x406b3b
mov eax, dword [esp + 0x330]
test eax, eax
je 0x406b13
mov cl, byte [eax]
mov al, byte [esi]
cmp cl, al
je 0x406b62
lea edx, [esp + 0x14]
lea eax, [esp + 0x320]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push ecx
push edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], edi
call sub.MPR.dll_WNetEnumResourceA
test eax, eax
je 0x406b00
mov edx, dword [esp + 0x10]
push edx
call sub.MPR.dll_WNetCloseEnum
mov eax, dword [esp + 0x728]
push esi
push eax
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::Copy_char___char_const__
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x714
ret
mov eax, dword [esp + 0x334]
lea ecx, [esp + 0x21c]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
call sym.mkss.exe_public:_static_int___cdecl_MSFS::CompletePath_char___char_const___char_const__
add esp, 0xc
test eax, eax
jl 0x406b58
lea eax, [esp + 0x11c]
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
call sym.mkss.exe_public:_static_int___cdecl_MSFS::AppendPath_char___char_const___char_const__
add esp, 0xc
test eax, eax
jl 0x406b58
mov ecx, dword [esp + 0x728]
lea eax, [esp + 0x18]
push eax
push ecx
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::Copy_char___char_const__
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x714
ret
Function at 0x406fa0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x158
mov eax, dword [esp + 0x160]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x16c]
push eax
push edi
lea ecx, [esp + 0x6c]
xor esi, esi
push str._s__s
push ecx
mov dword [esp + 0x30], 0x44
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
mov word [esp + 0x60], si
mov word [esp + 0x62], si
mov dword [esp + 0x64], esi
call fcn.0040a870
mov ebx, dword [esp + 0x184]
add esp, 0x10
mov ecx, ebx
lea edx, [esp + 0x10]
neg ecx
lea eax, [esp + 0x20]
push edx
sbb ecx, ecx
push eax
push esi
and ecx, 0x10
push esi
push ecx
push esi
push esi
lea edx, [esp + 0x80]
push esi
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
mov eax, dword [esp + 0x14]
push eax
call ebp
cmp edi, esi
jne 0x407067
push 0xffffffffffffffff
call sym.mkss.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret
cmp ebx, esi
jne 0x407078
mov ecx, dword [esp + 0x10]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 0x10]
push edx
call ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x158
ret

Function at 0x4070d0
Capabilities:
Get hostname

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push esi
mov esi, dword [esp + 0x24]
mov ecx, esi
push edi
mov edx, ecx
xor eax, eax
mov edi, ebx
mov dword [esp + 0xc], 0x10
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0xc]
lea ecx, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x407118
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x14
ret
lea edx, [esp + 0x10]
push esi
push edx
push ebx
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::CopyN_char___char_const___int_
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x14
ret

Function at 0x40a170
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10
lea ecx, [esp]
push esi
push edi
push 0xf
push eax
push ecx
xor esi, esi
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::CopyN_char___char_const___int_
add esp, 0xc
lea edx, [esp + 8]
mov edi, eax
push edx
call sym.mkss.exe_public:_static_void___cdecl_MSSTR::Upr_char__
mov eax, 0xf
add esp, 4
sub eax, edi
lea ecx, [esp + edi + 8]
push eax
push str.BrianDavidHarry
push ecx
call sym.mkss.exe_public:_static_int___cdecl_MSSTR::CopyN_char___char_const___int_
add esp, 0xc
xor eax, eax
movsx dx, byte [esp + eax + 8]
xor edx, 0x96
lea ecx, [eax + 1]
imul edx, ecx
add esi, edx
inc eax
cmp eax, 0xf
jl 0x40a1b6
mov ax, si
pop edi
pop esi
add esp, 0x10
ret
Function at 0x40bb60
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x41ca18]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40bb7f
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 [0x41ca14], 1
mov byte [0x41ca10], bl
jne 0x40bbd9
mov ecx, dword [0x41cf0c]
test ecx, ecx
je 0x40bbc7
mov esi, dword [0x41cf08]
sub esi, 4
cmp esi, ecx
jb 0x40bbc7
mov eax, dword [esi]
test eax, eax
je 0x40bbc0
call eax
mov ecx, dword [0x41cf0c]
sub esi, 4
cmp esi, ecx
jae 0x40bbb2
push 0x41901c
push 0x419014
call fcn.0040bc10
add esp, 8
push 0x419024
push 0x419020
call fcn.0040bc10
add esp, 8
test ebx, ebx
jne 0x40bc00
push ebp
mov dword [0x41ca18], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x40d4a0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416108
push 0x410f98
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xfffffff0
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 [0x41c9e8], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x41c9e4], ecx
shl ecx, 8
add ecx, edx
mov dword [0x41c9e0], ecx
shr eax, 0x10
mov dword [0x41c9dc], eax
call fcn.0040e350
test eax, eax
jne 0x40d50a
push 0x1c
call fcn.0040d5c0
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040da30
call fcn.00410e90
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41cf04], eax
call fcn.00410a50
mov dword [0x41ca3c], eax
test eax, eax
je 0x40d53d
mov eax, dword [0x41cf04]
test eax, eax
jne 0x40d547
push 0xffffffffffffffff
call fcn.0040bb00
add esp, 4
call fcn.004105a0
call fcn.004104b0
call fcn.0040bad0
mov eax, dword [0x41c9f8]
mov dword [0x41c9fc], eax
push eax
mov eax, dword [0x41c9f0]
push eax
mov ecx, dword [0x41c9ec]
push ecx
call fcn.00403090
add esp, 0xc
mov dword [ebp - 0x1c], eax
push eax
call fcn.0040bb00
jmp 0x40d5a2
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
Function at 0x410a50
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x41cbd0]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x410a92
call edi
mov esi, eax
test esi, esi
je 0x410a7c
mov eax, 1
jmp 0x410a8d
call ebp
mov ebx, eax
test ebx, ebx
je 0x410b9f
mov eax, 2
mov dword [0x41cbd0], eax
cmp eax, 1
jne 0x410b32
test esi, esi
jne 0x410aab
call edi
mov esi, eax
test esi, esi
je 0x410b9f
cmp word [esi], 0
mov eax, esi
je 0x410ac5
add eax, 2
cmp word [eax], 0
jne 0x410ab3
add eax, 2
cmp word [eax], 0
jne 0x410ab3
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x410b24
push edi
call fcn.0040c000
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x410b24
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x410b16
push ebx
call fcn.0040c250
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x410b9f
test ebx, ebx
jne 0x410b43
call ebp
mov ebx, eax
test ebx, ebx
je 0x410b9f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x410b5b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x410b4b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x410b4b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.0040c000
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x410b7d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x4110b0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x41c370
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x4110d4
add eax, 8
inc ebp
cmp eax, 0x41c400
jb 0x4110c5
cmp ecx, dword [ebp*8 + 0x41c370]
jne 0x41127b
mov eax, dword [0x41ca44]
cmp eax, 1
je 0x41123d
test eax, eax
jne 0x411100
cmp dword [0x419770], 1
je 0x41123d
cmp ecx, 0xfc
je 0x41127b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41113b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x411184
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x41697c
add ebx, ecx
push ebx
call fcn.0040fdf0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41695c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x41c374]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004139d0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x41ce00]
test eax, eax
je 0x41124e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x411258
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x41c374]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret