joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10038a21
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x1005df72
call fcn.1005c4f8
sub esp, 0xc
cmp byte [ebp + 8], 0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x14], dl
je 0x10038b10
mov dword [ebp + 8], 0x3f42
xor esi, esi
cmp dword [ebp + 8], 0x413a
jle 0x10038a8a
mov edi, esi
mov ebx, esi
mov dword [ebp - 0x18], esi
lea eax, [esi + ebx]
mov ecx, 0x10078fb8
xor eax, edi
cdq
push edx
push eax
call fcn.10001d2f
inc esi
cmp esi, 0x687e
jl 0x10038a5a
inc ebx
push 0
pop esi
cmp ebx, 0x1793
jl 0x10038a57
inc edi
cmp edi, 0x228a
jl 0x10038a55
mov dword [ebp - 4], esi
cmp dword [ebp + 8], 0x3f10
jge 0x10038ac3
mov edx, str.haikgjole_oay_fcqhdz_mrfxml_vyrftfki_ygpomnwaw_erkzcborf_ezzw_aszjfn_jmsrqe_ziz_qhwv_nmltjtt_eufoo
mov ecx, 0x10078fb8
call fcn.10003c4d
jmp 0x10038ac3
cmp byte [ebp - 0x14], 0
je 0x10038af4
mov eax, dword [ebp + 0x14]
xor edx, edx
xor ecx, ecx
inc edx
mov eax, dword [eax]
cmp eax, edx
setne cl
neg ecx
mov ecx, dword [ebp + 0x1c]
je 0x10038ae3
cmp dword [ecx], esi
jne 0x10038ae5
mov edx, esi
xor eax, eax
cmp edx, 0x67db
setg al
mov dword [ecx], eax
jmp 0x10038b56
push esi
push esi
push 0xe40
push esi
push 0x20e5
push esi
push 0x138e
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
jmp 0x10038b56
cmp byte [ebp + 0xc], 0
je 0x10038b3f
mov eax, dword [ebp + 0x18]
cmp byte [eax], 0
je 0x10038b56
push 0x23d7
push 0x95f
push 0x206d
push 0x12e8
push 0x1297
call dword [sym.imp.GDI32.dll_ExcludeClipRect]
jmp 0x10038b56
mov eax, dword [ebp + 0x20]
cmp byte [eax], 0
je 0x10038b56
push 0x2365
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x1003a08c
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
cmp byte [ebp + 0x10], 0
push ebx
push esi
push edi
mov ebx, edx
je 0x1003a0a8
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
jmp 0x1003a115
mov dword [esp + 0xc], 0x47c4
cmp dword [esp + 0xc], 0x4941
jle 0x1003a0fe
xor esi, esi
xor edi, edi
mov eax, edi
lea ecx, [esp + 0x10]
or eax, esi
cdq
push edx
push eax
call fcn.10001a85
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x1003a0d8
mov eax, dword [eax]
push eax
call fcn.10045794
pop ecx
push 0
push 1
lea ecx, [esp + 0x18]
call fcn.1000224a
inc edi
cmp edi, 0x1e42
jl 0x1003a0be
inc esi
cmp esi, 0x1a63
jl 0x1003a0bc
inc dword [ebx]
cmp dword [esp + 0xc], 0x4497
jge 0x1003a115
push str.gwhvgmvjy_tmar_kckvbmeft_vrhzgl_vdyuspik_deuwvr_sdbfkjnfu_xoe_bdmfp_nozww_dshinmol_bpgfm_jbbryxnnb
call fcn.10045794
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1003a143
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x1005dfee
call fcn.1005c4f8
sub esp, 0x18
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
test cl, cl
je 0x1003a193
cmp byte [ebp + 0x10], 0
je 0x1003a16a
mov eax, dword [ebp + 0x18]
inc dword [eax]
jmp 0x1003a29d
mov dword [edx], 0
cmp dword [edx], 2
jge 0x1003a29d
mov esi, dword [ebp + 0x14]
mov ecx, dword [edx]
mov eax, dword [esi]
mov dword [eax + ecx*4], 0xe469ad59
inc dword [edx]
cmp dword [edx], 2
jl 0x1003a17c
jmp 0x1003a29d
mov dword [ebp - 0x20], 0x4281
cmp dword [ebp - 0x20], 0x4612
jle 0x1003a21b
push 0x2148
push 0
push 0xf19
push 0
push 0x2109
push 0x26c6
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor esi, esi
mov dword [ebp - 0x1c], esi
xor edi, edi
mov dword [ebp - 0x18], edi
mov ecx, edi
mov dword [ebp - 0x24], esi
xor ebx, ebx
shl esi, cl
xor edi, edi
mov ecx, edi
mov eax, ebx
sar eax, cl
mov ecx, 0x10078fb8
xor eax, esi
cdq
push edx
push eax
call fcn.10001d2f
inc edi
cmp edi, 0x6ef8
jl 0x1003a1d6
inc ebx
cmp ebx, 0x3bbd
jl 0x1003a1d4
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
inc edi
mov dword [ebp - 0x18], edi
cmp edi, 0x29f2
jl 0x1003a1cb
inc esi
mov dword [ebp - 0x1c], esi
cmp esi, 0x7e02
jl 0x1003a1c6
and dword [ebp - 4], 0
cmp dword [ebp - 0x20], 0x41d1
jge 0x1003a237
mov edx, str.lmwljlumi_qauqbjon_mhmowdk_hbudap
mov ecx, 0x10078fb8
call fcn.10003c4d
or dword [ebp - 4], 0xffffffff
cmp byte [ebp + 0x1c], 0
je 0x1003a280
mov edx, dword [ebp + 8]
mov dword [edx], 0
cmp dword [edx], 3
jge 0x1003a29d
mov esi, dword [ebp + 0xc]
mov ecx, dword [edx]
mov eax, dword [esi]
mov dword [eax + ecx*4], 0xffff
inc dword [edx]
cmp dword [edx], 3
jl 0x1003a252
jmp 0x1003a29d
push 0
lea eax, [ebp - 0x11]
mov byte [ebp - 0x11], 0
push eax
push ecx
mov edx, 0x203
mov ecx, 0x5af3
call fcn.1003bcdc
add esp, 0xc
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1003a56b
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x1005e002
call fcn.1005c4f8
sub esp, 0x30
cmp byte [ebp + 0x10], 0
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x18], dl
mov dword [ebp - 0x24], ebx
je 0x1003a5c4
test dl, dl
je 0x1003a5a2
mov eax, dword [ebp + 8]
cmp byte [eax], 0
je 0x1003a5b3
push 1
push ecx
call fcn.10038282
jmp 0x1003a5b1
push 1
push ecx
lea edx, [ebp + 0x13]
mov byte [ebp + 0x13], 0
call fcn.10037e7a
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x20], 0x7cc9
cmp dword [ebp - 0x20], 0x7e6c
jle 0x1003a612
xor edi, edi
xor esi, esi
mov dword [ebp - 0x1c], esi
mov ebx, esi
mov esi, 0x42c4
mov eax, ebx
mov ecx, 0x10078fb8
xor eax, edi
cdq
push edx
push eax
call fcn.10001d2f
dec ebx
dec esi
jne 0x1003a5e2
mov esi, dword [ebp - 0x1c]
inc esi
mov dword [ebp - 0x1c], esi
cmp esi, 0x37ef
jl 0x1003a5db
inc edi
cmp edi, 0x3b8c
jl 0x1003a5d6
mov ebx, dword [ebp - 0x24]
cmp byte [ebp + 0x14], 0
je 0x1003a6ad
mov dword [ebp - 0x1c], 0x68f
cmp dword [ebp - 0x1c], 0x834
jle 0x1003a691
xor esi, esi
xor edi, edi
xor ebx, ebx
xor ecx, ecx
mov dword [ebp + 0x10], ecx
mov eax, ebx
sar eax, cl
lea ecx, [ebp - 0x3c]
and eax, edi
or eax, esi
cdq
push edx
push eax
call fcn.10001a85
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x1003a654
mov eax, dword [eax]
push eax
call fcn.10045794
pop ecx
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.1000224a
mov ecx, dword [ebp + 0x10]
inc ecx
mov dword [ebp + 0x10], ecx
cmp ecx, 0xf3f
jl 0x1003a637
inc ebx
cmp ebx, 0x3dc9
jl 0x1003a632
inc edi
cmp edi, 0x286
jl 0x1003a630
inc esi
cmp esi, 0x57b3
jl 0x1003a62e
cmp dword [ebp - 0x1c], 0x3ed
jge 0x1003a6a5
push str.ytaqau_ejacecm_ewol_rzolae_cnmkfwfx_qjhnhph_hnpv_unzeauc_zqu
call fcn.10045794
pop ecx
mov eax, dword [ebp + 0x18]
and dword [eax], 0
jmp 0x1003a6bf
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx]
mov dword [ebx], eax
mov eax, dword [ebx]
mov dword [edx], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [edx]
mov dword [eax], edx
mov dword [ebp - 4], 2
cmp dword [ebp - 0x20], 0x7ca4
jge 0x1003a5b3
mov edx, str.dqxmo_jwkf_haedcc_jon_kevcd_dxnz_tdh_fdyqdlafv_iionzjw_xatdwe_jmmherwk_gemnmqr_bqsbqadlq
mov ecx, 0x10078fb8
call fcn.10003c4d
jmp 0x1003a5b3
Function at 0x1003a867
Capabilities:
Encode data using xor
Get file attributes

Disassembly:
mov eax, 0x1005e016
call fcn.1005c4f8
sub esp, 0x10
cmp byte [ebp + 0x10], 0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
je 0x1003a8a2
push 1
push ecx
lea ecx, [ebp - 0x11]
mov byte [ebp - 0x11], 0
call fcn.10038316
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
lea edx, [ebp - 0x12]
mov byte [ebp - 0x12], bl
mov ecx, 0x1aa6
push ebx
call fcn.1003b6f8
mov dword [ebp - 0x1c], 0x3149
cmp dword [ebp - 0x1c], 0x351c
pop ecx
jle 0x1003a913
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, ebx
mov esi, ebx
mov dword [ebp - 0x18], ebx
mov ebx, esi
mov esi, 0x185d
mov eax, ebx
mov ecx, 0x10078fb8
xor eax, edi
cdq
push edx
push eax
call fcn.10001d2f
dec ebx
dec esi
jne 0x1003a8db
mov esi, dword [ebp - 0x18]
inc esi
mov dword [ebp - 0x18], esi
cmp esi, 0x6641
jl 0x1003a8d4
inc edi
push 0
pop ebx
cmp edi, 0x2f38
jl 0x1003a8cf
push ebx
push ebx
call dword [sym.imp.GDI32.dll_RectInRegion]
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x1c], 0x30b2
jge 0x1003a891
mov edx, str.pjfldbetg_rkquon_peumgamok_unrkaq_shllth_eprbx
mov ecx, 0x10078fb8
call fcn.10003c4d
jmp 0x1003a891

Function at 0x1003a9e5
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
cmp byte [ebp + 0xc], 0
push ebx
push esi
push edi
mov byte [ebp - 8], dl
mov byte [ebp - 0xc], 1
je 0x1003aa27
test dl, dl
je 0x1003aa0a
mov eax, dword [ebp + 0x14]
add dword [eax], 4
jmp 0x1003aacb
mov eax, dword [ebp + 8]
cmp byte [eax], 0
je 0x1003aacb
push 1
push ecx
push ecx
call fcn.10038443
add esp, 0xc
jmp 0x1003aacb
mov dword [ebp + 0xc], 0x365b
cmp dword [ebp + 0xc], 0x368d
push 0
pop ebx
jle 0x1003aaa7
push ebx
push ebx
push 0x16a0
push ebx
push 0x8b4
push ebx
push 0x166c
push 0x797
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, ebx
mov edi, ebx
lea eax, [edi + esi]
or eax, ebx
lea ecx, [ebp - 0x24]
cdq
push edx
push eax
call fcn.10001a85
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x1003aa76
mov eax, dword [eax]
push eax
call fcn.10045794
pop ecx
push 0
push 1
lea ecx, [ebp - 0x24]
call fcn.1000224a
inc ebx
cmp ebx, 0x5407
jl 0x1003aa5c
inc edi
push 0
pop ebx
cmp edi, 0x7623
jl 0x1003aa5c
inc esi
cmp esi, 0x2cc0
jl 0x1003aa5a
cmp dword [ebp + 0xc], 0x3338
jge 0x1003aabb
push str.squhaejd_jbd_mxeji_ujzqhaak_kdlxhs_gczscwmec_zmiuw_svod_erutwjr_lykkbcylq_uzbq
call fcn.10045794
pop ecx
push ebx
push 0x25bc
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4018d0
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4018fa
test byte [esp + 0xc], 0x80
je 0x4018ec
and al, 0xfe
jmp 0x4018ee
or al, 1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x40190e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00403950
add esp, 4
or eax, 0xffffffff
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x401920
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 0x401943
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00403950
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x401966
test byte [esp + 8], 2
je 0x401966
mov dword [0x40ac74], 0xd
mov dword [0x40ac78], 5
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x401ab0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x40acbc]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x401acf
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 [0x40acb8], 1
mov byte [0x40acb4], bl
jne 0x401b29
mov ecx, dword [0x40b18c]
test ecx, ecx
je 0x401b17
mov esi, dword [0x40b188]
sub esi, 4
cmp esi, ecx
jb 0x401b17
mov eax, dword [esi]
test eax, eax
je 0x401b10
call eax
mov ecx, dword [0x40b18c]
sub esi, 4
cmp esi, ecx
jae 0x401b02
push 0x40801c
push 0x408014
call fcn.00401b60
add esp, 8
push 0x408024
push 0x408020
call fcn.00401b60
add esp, 8
test ebx, ebx
jne 0x401b50
push ebp
mov dword [0x40acbc], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x401c20
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4070b8
push 0x405188
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 [0x40ac8c], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x40ac88], ecx
shl ecx, 8
add ecx, edx
mov dword [0x40ac84], ecx
shr eax, 0x10
mov dword [0x40ac80], eax
call fcn.00403db0
test eax, eax
jne 0x401c8a
push 0x1c
call fcn.00401d70
add esp, 4
mov dword [ebp - 4], 0
call fcn.00402980
call fcn.00405080
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40b184], eax
call fcn.00404a40
mov dword [0x40acc0], eax
test eax, eax
je 0x401cbd
mov eax, dword [0x40b184]
test eax, eax
jne 0x401cc7
push 0xffffffffffffffff
call fcn.00401a70
add esp, 4
call fcn.00404790
call fcn.004046a0
call fcn.00401a40
mov eax, dword [0x40ac9c]
mov dword [0x40aca0], eax
push eax
mov eax, dword [0x40ac94]
push eax
mov ecx, dword [0x40ac90]
push ecx
call fcn.00401100
add esp, 0xc
mov dword [ebp - 0x1c], eax
push eax
call fcn.00401a70
jmp 0x401d22
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 0x401d70
Capabilities:
Terminate process

Disassembly:
cmp dword [0x40acc8], 2
je 0x401d7e
call fcn.00405260
mov eax, dword [esp + 4]
push eax
call fcn.004052a0
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x403170
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x40b180]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x40331d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x40b080]
lea edi, [ecx*4 + 0x40b080]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x40331d
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x4031de
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x4031ef
push 2
push ebp
push eax
call fcn.00403390
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40334e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x403299
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40324a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x403237
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40321a
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40333f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x403295
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x403216
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40330e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4032e2
cmp eax, 5
jne 0x4032cb
mov dword [0x40ac78], eax
mov dword [0x40ac74], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00403950
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x403302
cmp byte [ebp], 0x1a
jne 0x403302
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x40ac74], 0x1c
jmp 0x403327
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x40ac74], 9
pop edi
pop esi
pop ebp
mov dword [0x40ac78], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x403295
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40337f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x403299
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x403299
Function at 0x404a40
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x40ae18]
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 0x404a82
call edi
mov esi, eax
test esi, esi
je 0x404a6c
mov eax, 1
jmp 0x404a7d
call ebp
mov ebx, eax
test ebx, ebx
je 0x404b8f
mov eax, 2
mov dword [0x40ae18], eax
cmp eax, 1
jne 0x404b22
test esi, esi
jne 0x404a9b
call edi
mov esi, eax
test esi, esi
je 0x404b8f
cmp word [esi], 0
mov eax, esi
je 0x404ab5
add eax, 2
cmp word [eax], 0
jne 0x404aa3
add eax, 2
cmp word [eax], 0
jne 0x404aa3
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 0x404b14
push edi
call fcn.00405480
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x404b14
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 0x404b06
push ebx
call fcn.004039c0
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 0x404b8f
test ebx, ebx
jne 0x404b33
call ebp
mov ebx, eax
test ebx, ebx
je 0x404b8f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x404b4b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404b3b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404b3b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00405480
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x404b6d
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 0x4052a0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40abc0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x4052c4
add eax, 8
inc ebp
cmp eax, 0x40ac50
jb 0x4052b5
cmp ecx, dword [ebp*8 + 0x40abc0]
jne 0x40546b
mov eax, dword [0x40acc8]
cmp eax, 1
je 0x40542d
test eax, eax
jne 0x4052f0
cmp dword [0x40866c], 1
je 0x40542d
cmp ecx, 0xfc
je 0x40546b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40532b
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 0x405374
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 0x407418
add ebx, ecx
push ebx
call fcn.00405730
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, 0x4073f8
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 + 0x40abc4]
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.00405ff0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x40b080]
test eax, eax
je 0x40543e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x405448
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40abc4]
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
Function at 0x4063d0
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.004065d0
mov eax, dword [0x40b180]
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
xor ebp, ebp
push esi
cmp ebx, eax
push edi
jae 0x406532
mov eax, ebx
mov ecx, ebx
sar eax, 5
and ecx, 0x1f
mov edx, dword [eax*4 + 0x40b080]
test byte [edx + ecx*8 + 4], 1
je 0x406532
push 1
push ebp
push ebx
call fcn.00403390
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x40653c
push 2
push ebp
push ebx
call fcn.00403390
add esp, 0xc
cmp eax, 0xffffffff
je 0x40653c
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x4064d8
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.00406550
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x40647f
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00403170
add esp, 0xc
cmp eax, 0xffffffff
je 0x40649b
sub esi, eax
test esi, esi
jle 0x4064b1
jmp 0x406470
cmp dword [0x40ac78], 5
jne 0x4064ae
mov dword [0x40ac74], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.00406550
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.00403390
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x406519
push 0
push ecx
push ebx
call fcn.00403390
add esp, 0xc
push ebx
call fcn.00405be0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x406519
mov dword [0x40ac74], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40ac78], eax
push 0
push edi
push ebx
call fcn.00403390
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
mov dword [0x40ac74], 9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret