joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407c50
Capabilities:
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xb4
push ebx
push esi
mov esi, dword [esp + 0xc0]
xor ebx, ebx
mov dword [esp + 8], 1
mov dword [esp + 0xc], 2
mov al, byte [esi + 0xb9e8a0]
mov dword [esp + 0x10], 4
test al, al
mov dword [esp + 0x14], 8
mov dword [esp + 0x18], 0x10
mov dword [esp + 0x1c], 0x20
mov dword [esp + 0x20], 0x40
mov dword [esp + 0x24], pe_nt_image_headers32
mov dword [esp + 0x28], 0x100
mov dword [esp + 0x2c], 0x200
mov dword [esp + 0x30], 0x400
mov dword [esp + 0x34], 0x800
mov dword [esp + 0x38], 0x1000
mov dword [esp + 0x3c], 0x2000
mov dword [esp + 0x40], 0x4000
mov dword [esp + 0x44], 0x8000
mov dword [esp + 0x48], 0x10000
mov dword [esp + 0x4c], 0x20000
mov dword [esp + 0x50], 0x40000
mov dword [esp + 0x54], 0x80000
mov dword [esp + 0x58], 0x100000
mov dword [esp + 0x5c], 0x200000
mov dword [esp + 0x60], 0x400000
mov dword [esp + 0x64], 0x800000
mov dword [esp + 0x68], 0x1000000
mov dword [esp + 0x6c], 0x2000000
mov dword [esp + 0x70], 0x4000000
mov dword [esp + 0x74], 0x8000000
mov dword [esp + 0x78], 0x10000000
mov dword [esp + 0x7c], 0x20000000
mov dword [esp + 0x80], 0x40000000
mov dword [esp + 0x84], 0x80000000
jne 0x407d7c
xor eax, eax
pop esi
pop ebx
add esp, 0xb4
ret
push edi
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0x8c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x8c]
mov dword [esp + 0x8c], 0x34
push eax
push esi
mov dword [esp + 0x98], 0x83
call dword [sym.imp.WINMM.dll_joyGetPosEx]
mov edx, dword [esp + 0xac]
xor ecx, ecx
lea eax, [esp + 0xc]
test dword [eax], edx
je 0x407dcc
mov edi, 1
shl edi, cl
or ebx, edi
inc ecx
add eax, 4
cmp ecx, 0x1c
jl 0x407dbf
lea eax, [esi + esi*4]
lea ecx, [eax + eax*4]
lea esi, [esi + ecx*4]
shl esi, 2
mov edx, dword [esi + 0xb9e8d4]
mov ecx, dword [esi + 0xb9e8d8]
sub ecx, edx
je 0x407e15
mov eax, dword [esp + 0x94]
lea edx, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [edx + edx*4]
shl edx, 3
lea eax, [eax + eax*4]
shl eax, 3
sub eax, edx
xor edx, edx
div ecx
sub eax, 0x64
mov ecx, eax
cmp ecx, 0xffffffdf
jge 0x407e20
or ebx, 0x10000000
cmp ecx, 0x21
jle 0x407e2b
or ebx, 0x20000000
mov ecx, dword [esi + 0xb9e8dc]
mov esi, dword [esi + 0xb9e8e0]
sub esi, ecx
je 0x407e5f
mov eax, dword [esp + 0x98]
lea ecx, [ecx + ecx*4]
xor edx, edx
lea eax, [eax + eax*4]
lea ecx, [ecx + ecx*4]
shl ecx, 3
lea eax, [eax + eax*4]
shl eax, 3
sub eax, ecx
div esi
sub eax, 0x64
mov esi, eax
cmp esi, 0xffffffdf
jge 0x407e6a
or ebx, 0x40000000
cmp esi, 0x21
jle 0x407e75
or ebx, 0x80000000
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0xb4
ret
Function at 0x407e90
Capabilities:
Inspect section memory permissions

Disassembly:
mov ax, word [0xb9e86e]
push esi
xor esi, esi
cmp ax, 0xffff
jne 0x407ea3
xor eax, eax
pop esi
ret
movsx eax, ax
push edi
push eax
call fcn.00407c50
add esp, 4
test eax, 0x10000000
je 0x407ebc
mov esi, pe_nt_image_headers32
test eax, 0x20000000
je 0x407ec6
or esi, 0x20
test eax, 0x40000000
je 0x407ed0
or esi, 0x10
test eax, 0x80000000
je 0x407eda
or esi, 0x40
and eax, 0xfffffff
xor edx, edx
mov ecx, dword [edx + 0x96e4f0]
mov edi, eax
and edi, ecx
cmp edi, ecx
jne 0x407efb
mov edi, dword [edx + 0x96e560]
not ecx
or esi, edi
and eax, ecx
add edx, 4
cmp edx, 0x70
jl 0x407ee1
mov eax, esi
pop edi
pop esi
ret

Function at 0x4083f0
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x24
mov eax, dword [esp + 0x30]
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
mov esi, ecx
and ebp, 0xfffffff
push edi
test eax, eax
mov dword [esp + 0x10], esi
jne 0x408413
test ebp, ebp
je 0x408420
push 0x20
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ah, 0x80
je 0x408434
mov edi, dword [esp + 0x38]
push str.None
mov ecx, edi
xor ebp, ebp
call fcn.0042509d
jmp 0x4084b0
test ebp, ebp
je 0x408542
xor ecx, ecx
xor eax, eax
mov edx, ebp
shr edx, cl
test dl, 1
je 0x40844a
inc eax
inc ecx
cmp ecx, 0x1c
jl 0x408440
cmp eax, 3
jg 0x408542
mov edi, dword [esp + 0x38]
push 0x43f74c
mov ecx, edi
call fcn.0042509d
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
xor esi, esi
mov eax, 1
mov ecx, esi
shl eax, cl
test ebp, eax
je 0x4084a6
lea ecx, [esi + 1]
lea edx, [esp + 0x14]
push ecx
push 0x436c6c
push edx
call fcn.00410f40
mov ecx, dword [edi + 0x1c]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0
push 0xc2
push ecx
call ebx
inc esi
cmp esi, 0x1c
jl 0x408471
mov esi, dword [esp + 0x10]
lea edx, [esi + 0x104]
cmp edx, edi
jne 0x4084ca
mov dword [0x96e5e8], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0xc
lea eax, [esi + 0x140]
cmp eax, edi
jne 0x4084e4
mov dword [0x96e5e0], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0xc
lea ecx, [esi + 0x17c]
cmp ecx, edi
jne 0x4084fe
mov dword [0x96e5ec], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0xc
lea edx, [esi + 0x1b8]
cmp edx, edi
jne 0x408518
mov dword [0x96e5f0], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0xc
lea eax, [esi + 0xc8]
cmp eax, edi
jne 0x408532
mov dword [0x96e5dc], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0xc
add esi, 0x8c
cmp esi, edi
jne 0x408542
mov dword [0x96e5e4], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0xc
Function at 0x408dd0
Capabilities:
Log keystrokes

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
push ebx
and edx, 0xff
push ebp
mov dword [esp + 0x14], edx
push esi
movsx edx, dx
push edi
xor edi, edi
mov esi, dword [edx*4 + 0x436cf0]
xor eax, eax
cmp esi, 0xffffffff
mov dword [esp + 0x10], edx
je 0x409022
mov edx, dword [ecx + 0x120]
mov ebx, dword [esp + 0x18]
cmp edx, ebx
jne 0x408e13
mov esi, 0x96e5fc
jmp 0x408e8d
cmp dword [ecx + 0x15c], ebx
jne 0x408e22
mov esi, 0x96e614
jmp 0x408e8d
cmp dword [ecx + 0x198], ebx
jne 0x408e31
mov esi, 0x96e5f4
jmp 0x408e8d
cmp dword [ecx + 0x1d4], ebx
jne 0x408e40
mov esi, 0x96e600
jmp 0x408e8d
cmp dword [ecx + 0x210], ebx
jne 0x408e4f
mov esi, 0x96e60c
jmp 0x408e8d
cmp dword [ecx + 0x24c], ebx
jne 0x408e5e
mov esi, 0x96e5f8
jmp 0x408e8d
cmp dword [ecx + 0x288], ebx
jne 0x408e6d
mov esi, 0x96e610
jmp 0x408e8d
cmp dword [ecx + 0x2c4], ebx
jne 0x408e7c
mov esi, 0x96e608
jmp 0x408e8d
cmp dword [ecx + 0xa8], ebx
jne 0x409022
mov esi, 0x96e604
mov ebp, dword [esp + 0x20]
test ebp, ebp
mov ebp, dword [sym.imp.USER32.dll_SetWindowTextA]
je 0x408fb7
cmp esi, 0x96e5fc
je 0x408ec2
mov bp, word [esp + 0x1c]
cmp word [0x96e5fc], bp
jne 0x408ebc
mov eax, edx
mov edi, 0x96e5fc
mov ebp, dword [sym.imp.USER32.dll_SetWindowTextA]
mov edx, dword [esp + 0x1c]
cmp esi, 0x96e614
je 0x408ee2
cmp word [0x96e614], dx
jne 0x408ee2
mov eax, dword [ecx + 0x15c]
mov edi, 0x96e614
cmp esi, 0x96e5f4
je 0x408efe
cmp word [0x96e5f4], dx
jne 0x408efe
mov eax, dword [ecx + 0x198]
mov edi, 0x96e5f4
cmp esi, 0x96e600
je 0x408f1a
cmp word [0x96e600], dx
jne 0x408f1a
mov eax, dword [ecx + 0x1d4]
mov edi, 0x96e600
cmp esi, 0x96e60c
je 0x408f36
cmp word [0x96e60c], dx
jne 0x408f36
mov eax, dword [ecx + 0x210]
mov edi, 0x96e60c
cmp esi, 0x96e5f8
je 0x408f52
cmp word [0x96e5f8], dx
jne 0x408f52
mov eax, dword [ecx + 0x24c]
mov edi, 0x96e5f8
cmp esi, 0x96e610
je 0x408f6e
cmp word [0x96e610], dx
jne 0x408f6e
mov eax, dword [ecx + 0x288]
mov edi, 0x96e610
cmp esi, 0x96e608
je 0x408f8a
cmp word [0x96e608], dx
jne 0x408f8a
mov eax, dword [ecx + 0x2c4]
mov edi, 0x96e608
cmp esi, 0x96e604
je 0x408fa6
cmp word [0x96e604], dx
jne 0x408fa6
mov eax, dword [ecx + 0xa8]
mov edi, 0x96e604
test eax, eax
je 0x408fbb
push str.None
push eax
call ebp
mov word [edi], 0
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov word [esi], dx
mov eax, dword [ecx*4 + 0x436cf0]
test eax, eax
jne 0x409011
push 2
push ecx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
test al, 0x80
jne 0x408ffc
test eax, eax
je 0x408ffc
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push eax
push ebx
mov byte [esp + 0x21], 0
call ebp
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
push str.None
push ebx
call ebp
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
push eax
push ebx
call ebp
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 0xc
Function at 0x4113d0
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 0x4113f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00414c20
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x411418
test byte [esp + 8], 2
je 0x411418
call fcn.00414ca0
mov dword [eax], 0xd
call fcn.00414cb0
mov dword [eax], 5
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x411d50
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00411e10
mov eax, dword [0xba02a0]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x411d74
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 [0xba029c], 1
mov byte [0xba0298], bl
jne 0x411dce
mov ecx, dword [0xba3ff0]
test ecx, ecx
je 0x411dbc
mov esi, dword [0xba3fec]
sub esi, 4
cmp esi, ecx
jb 0x411dbc
mov eax, dword [esi]
test eax, eax
je 0x411db5
call eax
mov ecx, dword [0xba3ff0]
sub esi, 4
cmp esi, ecx
jae 0x411da7
push 0x435078
push 0x435070
call fcn.00411e30
add esp, 8
push 0x435084
push 0x43507c
call fcn.00411e30
add esp, 8
test ebx, ebx
je 0x411ded
call fcn.00411e20
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0xba02a0], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x411ea0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42edf0
push 0x411c08
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 [0xba0270], edx
mov ecx, eax
and ecx, 0xff
mov dword [0xba026c], ecx
shl ecx, 8
add ecx, edx
mov dword [0xba0268], ecx
shr eax, 0x10
mov dword [0xba0264], eax
call fcn.00412180
test eax, eax
jne 0x411f0a
push 0x1c
call fcn.00412050
add esp, 4
call fcn.00412080
test eax, eax
jne 0x411f1d
push 0x10
call fcn.00412050
add esp, 4
mov dword [ebp - 4], 0
call fcn.004135b0
call fcn.00415170
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0xba3fe8], eax
call fcn.004174d0
mov dword [0xba02a4], eax
test eax, eax
je 0x411f50
mov eax, dword [0xba3fe8]
test eax, eax
jne 0x411f5a
push 0xffffffffffffffff
call fcn.00411d10
add esp, 4
call fcn.00417220
call fcn.00417130
call fcn.00411ce0
mov esi, dword [0xba3fe8]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x412039
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x411fa1
test al, al
je 0x411fa1
and eax, 0xff
push eax
call fcn.004170d0
add esp, 4
test eax, eax
je 0x411f7b
inc esi
mov dword [ebp - 0x64], esi
jmp 0x411f7b
cmp byte [esi], 0x22
jne 0x411faa
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x411fba
cmp al, 0x20
ja 0x411fba
inc esi
mov dword [ebp - 0x64], esi
jmp 0x411faa
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x411fdb
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x411fe0
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.00411d10
jmp 0x41201e
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 0x411faa
inc esi
mov dword [ebp - 0x64], esi
jmp 0x412039

Function at 0x412080
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.004121c0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x43a698], eax
je 0x4120d8
push 0x74
push 1
call fcn.00417850
mov esi, eax
add esp, 8
test esi, esi
je 0x4120d8
mov eax, dword [0x43a698]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4120d8
push esi
call fcn.004120e0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x412100
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x43a698]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x41216e
push 0x74
push 1
call fcn.00417850
mov esi, eax
add esp, 8
test esi, esi
je 0x412164
mov ecx, dword [0x43a698]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x412164
push esi
call fcn.004120e0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.00412050
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x412d30
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x412d5c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0xba3ee0]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x412d97
push 2
push ebp
push ecx
call fcn.00413530
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x412ef9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x412e41
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x412df2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x412ddf
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 0x412dc2
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 0x412eea
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x412e3d
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x412dbe
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x412ed9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x412e95
cmp eax, 5
jne 0x412e7e
call fcn.00414ca0
mov dword [eax], 9
call fcn.00414cb0
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00414c20
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 0x412eb5
cmp byte [ebp], 0x1a
jne 0x412eb5
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.00414ca0
mov dword [eax], 0x1c
call fcn.00414cb0
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x412e3d
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 0x412f2a
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x412e41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x412e41
Function at 0x4174d0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0xba0548]
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 0x417512
call edi
mov esi, eax
test esi, esi
je 0x4174fc
mov eax, 1
jmp 0x41750d
call ebp
mov ebx, eax
test ebx, ebx
je 0x41761f
mov eax, 2
mov dword [0xba0548], eax
cmp eax, 1
jne 0x4175b2
test esi, esi
jne 0x41752b
call edi
mov esi, eax
test esi, esi
je 0x41761f
cmp word [esi], 0
mov eax, esi
je 0x417545
add eax, 2
cmp word [eax], 0
jne 0x417533
add eax, 2
cmp word [eax], 0
jne 0x417533
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 0x4175a4
push edi
call fcn.00410b20
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4175a4
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 0x417596
push ebx
call fcn.00410ab0
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 0x41761f
test ebx, ebx
jne 0x4175c3
call ebp
mov ebx, eax
test ebx, ebx
je 0x41761f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4175db
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4175cb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4175cb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00410b20
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4175fd
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 0x417670
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x43cad8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x417694
add eax, 8
inc ebp
cmp eax, 0x43cb68
jb 0x417685
cmp ecx, dword [ebp*8 + 0x43cad8]
jne 0x41783b
mov eax, dword [0xba02ac]
cmp eax, 1
je 0x4177fd
test eax, eax
jne 0x4176c0
cmp dword [0x43a694], 1
je 0x4177fd
cmp ecx, 0xfc
je 0x41783b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4176fb
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 0x417744
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 0x42f214
add ebx, ecx
push ebx
call fcn.00418f20
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, 0x42f1f4
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 + 0x43cadc]
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.004193f0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0xba3ee0]
test eax, eax
je 0x41780e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x417818
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x43cadc]
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 0x419520
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.00410d00
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push esi
push edi
xor ebp, ebp
push 1
push ebp
push ebx
call fcn.00413530
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x419660
push 2
push ebp
push ebx
call fcn.00413530
add esp, 0xc
cmp eax, 0xffffffff
je 0x419660
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x419601
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.0041aaf0
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x4195a6
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00412d30
add esp, 0xc
cmp eax, 0xffffffff
je 0x4195c2
sub esi, eax
test esi, esi
jle 0x4195da
jmp 0x419597
call fcn.00414cb0
cmp dword [eax], 5
jne 0x4195d7
call fcn.00414ca0
mov dword [eax], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.0041aaf0
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.00413530
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x419647
push 0
push ecx
push ebx
call fcn.00413530
add esp, 0xc
push ebx
call fcn.00417d30
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 0x419647
call fcn.00414ca0
mov dword [eax], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00414cb0
mov dword [eax], esi
push 0
push edi
push ebx
call fcn.00413530
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret