joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4fd2f5
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xcc
mov eax, dword [0x58b148]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
mov ebx, dword [esp + 0xd4]
xor edx, edx
push ebp
mov ebp, dword [esp + 0xdc]
xor eax, eax
push edi
push 7
pop ecx
mov dword [esp + 0x14], edx
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
push 7
pop ecx
mov dword [esp + 0x34], edx
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
push 7
pop ecx
mov dword [esp + 0x10], ebx
lea edi, [esp + 0x58]
mov dword [esp + 0x54], edx
xor ebx, ebx
rep stosd dword es:[edi], eax
inc ebx
mov dword [esp + 0xc], 0x20
mov edi, 0xbf
push esi
test ebx, ebx
jne 0x4fd384
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.004fb6bb
add esp, 0x18
lea eax, [edi + 0x40]
push eax
push ebp
call fcn.004f9d55
mov esi, eax
push edi
push ebp
shl esi, 3
call fcn.004f9d55
shl eax, 2
or esi, eax
lea eax, [edi - 0x40]
push eax
push ebp
call fcn.004f9d55
add eax, eax
or esi, eax
lea eax, [edi - 0x80]
push eax
push ebp
call fcn.004f9d55
or esi, eax
lea eax, [esp + 0x98]
push eax
push 0x582150
push 0xf
push esi
call fcn.004fb80c
add esp, 0x30
test ebx, ebx
jne 0x4fd417
lea eax, [esp + 0xb8]
push eax
lea eax, [esp + 0x9c]
push eax
lea eax, [esp + 0x80]
push eax
push 1
lea eax, [esp + 0x68]
push eax
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.004fb26e
add esp, 0x28
jmp 0x4fd44f
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004f9d25
lea eax, [esp + 0xa0]
push eax
lea eax, [esp + 0x44]
push eax
call fcn.004f9d25
lea eax, [esp + 0xc8]
push eax
lea eax, [esp + 0x6c]
push eax
call fcn.004f9d25
add esp, 0x18
xor ebx, ebx
lea eax, [edi + 0x20]
push eax
push ebp
call fcn.004f9d55
lea ecx, [edi - 0x20]
mov esi, eax
push ecx
push ebp
shl esi, 3
call fcn.004f9d55
shl eax, 2
or esi, eax
lea eax, [edi - 0x60]
push eax
push ebp
call fcn.004f9d55
add eax, eax
or esi, eax
lea eax, [edi - 0xa0]
push eax
push ebp
call fcn.004f9d55
or esi, eax
lea eax, [esp + 0x98]
push eax
push 0x581d90
push 0xf
push esi
call fcn.004fb80c
lea eax, [esp + 0xe8]
push eax
lea eax, [esp + 0xcc]
push eax
lea eax, [esp + 0xb0]
push eax
push 1
lea eax, [esp + 0x98]
push eax
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0xa4]
push eax
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 0x6c]
push eax
call fcn.004fb26e
add esp, 0x58
dec edi
sub dword [esp + 0x10], 1
jne 0x4fd35a
mov ebx, dword [esp + 0x14]
lea eax, [esp + 0x18]
pop esi
push eax
push ebx
call fcn.004f9d42
lea eax, [esp + 0x3c]
push eax
lea eax, [ebx + 0x20]
push eax
call fcn.004f9d42
lea eax, [esp + 0x64]
push eax
lea eax, [ebx + 0x40]
push eax
call fcn.004f9d42
mov ecx, dword [esp + 0xec]
add esp, 0x18
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.004fef98
add esp, 0xcc
ret
Function at 0x4fd779
Capabilities:
Encode data using xor

Disassembly:
push edi
mov edi, dword [esp + 0x10]
or eax, 0xffffffff
test edi, edi
je 0x4fd7b1
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0x14]
sub ebx, esi
mov edx, dword [ebx + esi]
xor edx, dword [esi]
lea esi, [esi + 4]
lea ecx, [edx - 1]
not edx
shr ecx, 0x1f
shr edx, 0x1f
and ecx, edx
neg ecx
and eax, ecx
sub edi, 1
jne 0x4fd791
pop esi
pop ebx
pop edi
ret

Function at 0x4fe88b
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x14
push ebx
push ebp
xor eax, eax
mov dword [esp + 0x10], 0x40
xorps xmm0, xmm0
inc eax
and dword [esp + 8], 0
movlpd qword [esp + 0x14], xmm0
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push esi
mov dword [esp + 0x10], eax
push edi
mov esi, eax
xor edi, edi
and esi, 1
neg esi
adc edi, edi
and esi, dword [esp + 0x28]
neg edi
mov ecx, esi
and esi, dword [esp + 0x14]
xor ecx, eax
mov edx, edi
and edx, dword [esp + 0x2c]
mov eax, edx
and edx, dword [esp + 0x10]
xor eax, dword [esp + 0x10]
shrd ecx, eax, 1
shr eax, 1
add ecx, esi
mov dword [esp + 0x14], ecx
adc eax, edx
and edi, 0x80000000
shrd ebp, ebx, 1
mov dword [esp + 0x10], eax
xor eax, eax
shr ebx, 1
add ebp, eax
mov eax, ecx
adc ebx, edi
sub dword [esp + 0x18], 1
jne 0x4fe8b7
pop edi
pop esi
mov eax, ebp
mov edx, ebx
pop ebp
pop ebx
add esp, 0x14
ret

Function at 0x4ff46b
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
test eax, eax
je 0x4ff4aa
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4ff4aa
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4ff4aa
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4ff4aa
cmp dword [ecx + 0x74], 0xe
jbe 0x4ff4aa
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x5066c6
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x506763
push ebx
push esi
call fcn.0050668f
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.005065d8
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x506710
push esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x506762
push edi
push eax
call fcn.005072c6
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x506730
call fcn.00505201
pop ecx
push esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x506761
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.005065d8
add esp, 0x20
test eax, eax
jne 0x50674f
push edi
call fcn.00505201
jmp 0x506757
push ebx
call fcn.00505201
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x507a49
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x584448
push 0x584440
push str.FlsAlloc
push 0x1e
call fcn.0050790a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x507a7d
push dword [ebp + 8]
mov ecx, esi
call dword [0x51141c]
call esi
jmp 0x507a83
call dword [sym.imp.kernel32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x507ac7
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x584458
push 0x584450
push str.FlsGetValue
push 0x20
call fcn.0050790a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x507afe
push dword [ebp + 8]
mov ecx, esi
call dword [0x51141c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.kernel32.dll_TlsGetValue]
Function at 0x50cf80
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x50cfad
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x50cfad
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x50f990
Capabilities:
Allocate thread local storage

Disassembly:
push ebx
push edi
push esi
sub esp, 0x20
cmp dword [ecx + 4], 0
mov esi, ecx
je 0x50fa0a
lea ebx, [esi + 0xc]
mov dword [esp + 4], 0
lea eax, [esp + 4]
push 0
push eax
push 0
push ebx
call dword [sym.imp.kernel32.dll_InitOnceBeginInitialize]
cmp eax, 1
mov dword [esp], eax
jne 0x50fa45
cmp dword [esp + 4], 0
je 0x50fa2c
call dword [sym.imp.kernel32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x50fa68
mov edi, eax
inc eax
mov dword [esi], eax
mov eax, dword [0x58bab4]
nop word cs:[eax + eax]
nop
mov dword [esi + 8], eax
lock cmpxchg dword [0x58bab4], esi
jne 0x50f9f0
push 0
push 0
push ebx
call dword [sym.imp.kernel32.dll_InitOnceComplete]
jmp 0x50fa3c
call dword [sym.imp.kernel32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esp], eax
je 0x50faab
mov ecx, eax
xor eax, eax
inc ecx
lock cmpxchg dword [esi], ecx
jne 0x50fa30
mov edi, dword [esp]
jmp 0x50fa3c
mov edi, dword [esi]
jmp 0x50fa3b
mov edi, eax
push dword [esp]
call dword [sym.imp.kernel32.dll_TlsFree]
dec edi
mov eax, edi
add esp, 0x20
pop esi
pop edi
pop ebx
ret
mov dword [esp + 0x10], 0
lea eax, [esp + 8]
mov ecx, esp
mov edx, 0x557fcc
push 0x558000
push eax
call fcn.0050fae0
add esp, 8
ud2
push 0
push 4
push ebx
call dword [sym.imp.kernel32.dll_InitOnceComplete]
lea ecx, [esp + 8]
mov edx, 0x55802c
mov dword [esp + 0x10], 0x558024
mov dword [esp + 0x14], 1
mov dword [esp + 8], 0
mov dword [esp + 0x18], str._rustc_90c541806f23a127002de5b4038be731ba1458calibrarycore_src_strpattern.rs
mov dword [esp + 0x1c], 0
call fcn.0050d4d0
ud2
mov ecx, esp
lea edx, [esp + 8]
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0x558024
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], str._rustc_90c541806f23a127002de5b4038be731ba1458calibrarycore_src_strpattern.rs
mov dword [esp + 0x1c], 0
call fcn.0050fb40
ud2
Function at 0x50ff70
Capabilities:
Resolve dns

Disassembly:
push ebx
push edi
push esi
sub esp, 0x34
mov esi, ecx
lea ecx, [esp + 4]
push dword [esp + 0x44]
call fcn.00416ad0
add esp, 4
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x50ffb0
mov eax, dword [0x557150]
mov edx, dword [0x557154]
cmp dword [esp + 8], 0
mov dword [esi + 8], edx
mov dword [esi + 4], eax
mov dword [esi], 1
jne 0x51001f
jmp 0x510029
mov edi, dword [esp + 4]
mov ebx, dword [esp + 8]
xorps xmm0, xmm0
mov eax, esp
mov dword [esp], 0
lea ecx, [esp + 0x14]
movups xmmword [esp + 0x14], xmm0
movups xmmword [esp + 0x24], xmm0
mov dword [esp + 0x1c], 1
push eax
push ecx
push 0
push edi
call dword [sym.imp.ws2_32.dll_getaddrinfo]
test eax, eax
je 0x510000
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov dword [esi + 8], eax
mov dword [esi + 4], 0
mov eax, 1
jmp 0x510014
mov ecx, dword [esp]
movzx eax, word [esp + 0x48]
mov dword [esi + 4], ecx
mov dword [esi + 8], ecx
mov word [esi + 0xc], ax
xor eax, eax
test ebx, ebx
mov dword [esi], eax
mov byte [edi], 0
je 0x510029
mov ecx, edi
mov edx, 1
call fcn.00415e60
add esp, 0x34
pop esi
pop edi
pop ebx
ret
Function at 0x401340
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4094fd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x218
push ebx
push ebp
push esi
push edi
mov esi, ecx
push sub.MFC42.DLL_CString::CString
push sub.MFC42.DLL_CString::CString_2
push 5
lea eax, [esi + 0x1f38]
push 4
push eax
mov dword [esp + 0x38], esi
call fcn.004082a4
lea edi, [esi + 0x1f4c]
mov dword [esp + 0x230], 0
mov ecx, edi
call sub.MFC42.DLL_CString::CString_2
lea ebx, [esi + 0x1f50]
mov byte [esp + 0x230], 1
mov ecx, ebx
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x128]
mov byte [esp + 0x230], 2
push ecx
push 0xff
mov dword [esi], 0x40a794
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [esp + 0x1e]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x1a]
and eax, 0xffff
push eax
mov eax, dword [esp + 0x1c]
and ecx, 0xffff
and edx, 0xffff
push ecx
mov ecx, dword [esp + 0x18]
and eax, 0xffff
push edx
mov edx, dword [esp + 0x1e]
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push eax
mov eax, dword [esp + 0x26]
and ecx, 0xffff
and edx, 0xffff
push ecx
and eax, 0xffff
push edx
push eax
lea ecx, [esp + 0x44]
push str._02d_02d_04d__02d_02d_02d_03d.BMP
push ecx
call ebp
add esp, 0x24
lea edx, [esp + 0x128]
mov ecx, edi
push edx
call fcn.00407edc
lea eax, [esp + 0x28]
mov ecx, edi
push eax
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [esp + 0x1e]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x1a]
and ecx, 0xffff
push ecx
mov ecx, dword [esp + 0x1c]
and edx, 0xffff
and eax, 0xffff
push edx
mov edx, dword [esp + 0x18]
and ecx, 0xffff
push eax
push ecx
mov eax, dword [esp + 0x22]
mov ecx, dword [esp + 0x26]
and edx, 0xffff
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
lea edx, [esp + 0x44]
push str._02d_02d_04d__02d_02d_02d_03d.JPG
push edx
call ebp
add esp, 0x24
lea eax, [esp + 0x128]
mov ecx, ebx
push eax
call fcn.00407edc
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_1
xor edi, edi
push edi
push edi
push 1
push edi
mov dword [esi + 0x1f58], edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x1f2c
mov dword [esi + 0x1f54], eax
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x240]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x23c]
add esp, 4
cmp eax, edi
mov dword [esi + 0x1f5c], eax
mov dword [esi + 0x1f60], ecx
mov dword [esi + 0x1f64], 0x3c
mov dword [esi + 8], edi
je 0x401523
push ecx
mov ecx, esi
call fcn.00403890
mov ecx, dword [esp + 0x228]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x224
ret 8
Function at 0x401560
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x409544
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
mov dword [esi], 0x40a794
mov ecx, dword [esi + 8]
mov dword [esp + 0x1c], 2
test ecx, ecx
je 0x4015a2
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [esi + 8], 0
mov eax, dword [esi + 0x1f4c]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edi, [esi + 0x1f4c]
push eax
call ebx
mov eax, dword [esi + 0x1f50]
lea ebp, [esi + 0x1f50]
push eax
call ebx
mov ecx, ebp
mov byte [esp + 0x1c], 1
call sub.MFC42.DLL_CString::CString
mov ecx, edi
mov byte [esp + 0x1c], 0
call sub.MFC42.DLL_CString::CString
push sub.MFC42.DLL_CString::CString
push 5
add esi, 0x1f38
push 4
push esi
mov dword [esp + 0x2c], 0xffffffff
call fcn.004081b0
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x401fd0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
mov edx, dword [0x40a5e9]
push ebx
mov eax, dword [0x40a5e1]
push esi
mov esi, ecx
push edi
mov ecx, dword [0x40a5e5]
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40a5ed]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov word [esp + 0x20], GetComputerNameA
mov word [esp + 0x22], 0x1f00
mov byte [esp + 0x24], 0
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40a5f4]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xb
jbe 0x40202b
mov ecx, dword [0x40a605]
mov edx, dword [0x40a609]
mov eax, dword [0x40a601]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40a60d]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov byte [esp + 0x24], 1
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40a614]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xb
jbe 0x40208c
mov ecx, dword [0x40a625]
mov edx, dword [0x40a629]
mov eax, dword [0x40a621]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40a62d]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov word [esp + 0x22], 0xb500
mov byte [esp + 0x24], 0x10
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40a634]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xa1
jbe 0x4020f4
mov ecx, dword [0x40a6dd]
mov edx, dword [0x40a6e1]
mov eax, dword [0x40a6d9]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40a6e5]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov byte [esp + 0x24], 0x11
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40a6ec]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xa1
jbe 0x402158
pop edi
pop esi
pop ebx
add esp, 0x1c
ret

Function at 0x402190
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x10
xor al, al
mov dl, 0x11
mov byte [esp + 6], al
mov byte [esp + 0xb], al
mov byte [esp + 0xd], al
mov eax, dword [ecx + 4]
push eax
push 1
lea ecx, [esp + 8]
push 0xe
push ecx
mov word [esp + 0x10], 0xdaff
mov word [esp + 0x12], 0xc00
mov byte [esp + 0x14], 3
mov byte [esp + 0x15], 1
mov byte [esp + 0x17], 2
mov byte [esp + 0x18], dl
mov byte [esp + 0x19], 3
mov byte [esp + 0x1a], dl
mov byte [esp + 0x1c], 0x3f
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x20
ret
Function at 0x402ec0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov al, byte [esp + 0xc]
push esi
dec al
mov esi, ecx
js 0x402f74
movsx eax, al
push ebp
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
lea ebp, [eax*2 + 0x40a4c0]
inc eax
mov dword [esp + 0xc], eax
mov ax, word [ebp]
mov edx, dword [esp + 0x14]
and eax, edx
test ax, ax
je 0x402f07
movsx ecx, byte [esi + 1]
mov al, byte [esi]
mov dl, byte [ecx*2 + 0x40a4c0]
or al, dl
mov byte [esi], al
mov al, byte [esi + 1]
sub ebp, 2
dec al
mov byte [esi + 1], al
jns 0x402f63
mov al, byte [esi]
cmp al, 0xff
jne 0x402f46
mov byte [esp + 0x18], al
mov eax, dword [esi + 4]
push eax
push 1
lea ecx, [esp + 0x20]
push 1
push ecx
call edi
mov edx, dword [esi + 4]
lea eax, [esp + 0x28]
push edx
push 1
push 1
push eax
mov byte [esp + 0x38], 0
call edi
add esp, 0x20
jmp 0x402f5c
mov ecx, dword [esi + 4]
lea edx, [esp + 0x18]
push ecx
push 1
push 1
push edx
mov byte [esp + 0x28], al
call edi
add esp, 0x10
mov byte [esi + 1], 7
mov byte [esi], 0
mov eax, dword [esp + 0xc]
dec eax
mov dword [esp + 0xc], eax
jne 0x402ee7
pop edi
pop ebp
pop esi
pop ecx
ret 8
Function at 0x4039d0
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
sub esp, 0x304
push ebx
push ebp
push esi
mov esi, dword [esp + 0x314]
mov ebx, ecx
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [ebx], 0x40a828
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call sub.MFC42.DLL_operatornew
mov edi, dword [esp + 0x320]
mov dword [0x40d6f4], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call sub.MFC42.DLL_operatornew
mov dword [0x40d6f8], eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [sym.imp.MSVCRT.dll__strlwr]
mov eax, ecx
mov esi, edi
mov edi, dword [0x40d6f4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x40d6f4]
push ecx
call ebp
mov edi, dword [esp + 0x328]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [0x40d6f8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40d6f8]
push eax
call ebp
mov ecx, dword [esp + 0x330]
add esp, 0x10
lea edx, [esp + 0x214]
mov dword [0x40d0ec], ecx
push 0xff
push edx
push 0
mov dword [ebx + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x14]
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
push 0x5c
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x17], al
lea ecx, [esp + 0x218]
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x11c]
lea edi, [edx + 1]
mov dword [esp + 0x18], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x11c]
mov byte [edx], 0
push ecx
call ebp
add esp, 0xc
push str.flash
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov edi, dword [0x40d6f8]
mov esi, eax
add esp, 8
lea eax, [esp + 0x114]
neg esi
sbb esi, esi
neg esi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x403b69
test cl, cl
je 0x403b65
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x403b69
add eax, 2
add edi, 2
test cl, cl
jne 0x403b45
xor edi, edi
jmp 0x403b6e
sbb edi, edi
sbb edi, 0xffffffff
lea eax, [esp + 0x14]
push eax
call fcn.00404430
cmp eax, 0x20
jle 0x403ba2
test esi, esi
jne 0x403bb0
test edi, edi
je 0x403bb0
push 5
push 0x521
mov ecx, ebx
call fcn.004048a0
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x304
ret 0xc
mov ecx, ebx
mov dword [ebx + 0xc], 1
call fcn.00403d70
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x304
ret 0xc
Function at 0x403d70
Capabilities:
Get common file path

Disassembly:
sub esp, 0x38
push ebx
push esi
xor esi, esi
push edi
mov edi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 0x30
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0x403ce0
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], str.AStuckWnd
mov dword [esp + 0x44], esi
call dword [sym.imp.USER32.dll_RegisterClassExA]
push esi
push ebx
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0x40d128
push str.AStuckWnd
push esi
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, esi
mov dword [edi + 4], eax
jne 0x403df4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x38
ret
lea ecx, [esp + 0xc]
mov dword [esp + 0x10], 1
push ecx
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x403e4d
push str.Shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, esi
je 0x403e4d
push str.SHChangeNotifyRegister
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [edi + 4]
lea edx, [esp + 0xc]
push edx
push 1
push 0x458
push 0x100
push 2
push ecx
call eax
push ebx
mov dword [edi + 8], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [edi + 8]
xor eax, eax
cmp ecx, esi
pop edi
pop esi
pop ebx
setne al
add esp, 0x38
ret