joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47f659
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push 4
mov eax, 0x4cb7fc
call fcn.004ae200
and dword [ebp - 0x10], 0
mov ecx, dword [ebp + 8]
call fcn.00402865
and dword [ebp - 4], 0
push dword [ebp + 0xc]
mov dword [ebp - 0x10], 1
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x47f6b0
push 0xd
call dword [sym.imp.USER32.dll_GetClipboardData]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [ebp + 8]
push eax
call fcn.0040276b
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
mov eax, dword [ebp + 8]
call fcn.004ae2d8
ret

Function at 0x4836bc
Capabilities:
Parse credit card information

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, eax
mov ecx, dword [esi + 0x4c]
push edi
mov edi, 0xffff
xor al, al
mov bl, 1
cmp ecx, edi
je 0x483858
mov ebp, 0x10000000
cmp ecx, 0x7c
je 0x483858
cmp ecx, 0x29
jne 0x483706
cmp dword [esi + 0x1c], 0
jne 0x483858
test dword [esi + 0x50], ebp
jne 0x483706
push 5
call fcn.004c7cce
pop ecx
jmp 0x483842
cmp ecx, 0x2e
jne 0x483722
push 5
lea eax, [esi + 0x24]
push eax
call fcn.0048393d
mov eax, esi
call fcn.00483681
jmp 0x483842
cmp ecx, 0x5c
jne 0x483783
mov eax, esi
call fcn.00483681
mov eax, dword [esi + 0x50]
and eax, 0x80
je 0x483756
cmp word [esi + 0x4a], 0x62
jne 0x483756
push 4
lea eax, [esi + 0x24]
push eax
call fcn.0048393d
mov eax, esi
call fcn.00483681
jmp 0x483849
test eax, eax
je 0x483777
cmp word [esi + 0x4a], 0x42
jne 0x483777
push 4
lea eax, [esi + 0x24]
push eax
call fcn.0048393d
mov eax, dword [esi + 0x28]
add eax, 8
or dword [eax], 1
jmp 0x48374a
mov eax, esi
call fcn.00483c8d
jmp 0x483842
cmp ecx, 0x5b
jne 0x4837ad
mov eax, esi
call fcn.00483681
mov eax, esi
call fcn.00483c42
cmp dword [esi + 0x4c], 0x5d
je 0x483716
push 4
call fcn.004c7cce
pop ecx
jmp 0x483716
cmp ecx, 0x28
jne 0x4837d7
mov eax, esi
call fcn.00483681
call fcn.00483d5c
cmp dword [esi + 0x4c], 0x29
mov bl, al
je 0x4837ce
push 5
call fcn.004c7cce
pop ecx
mov eax, esi
call fcn.00483681
jmp 0x48383e
cmp ecx, 0x5e
jne 0x4837e3
push 2
jmp 0x483741
cmp ecx, 0x24
jne 0x4837ef
push 3
jmp 0x483741
cmp ecx, 0x2a
je 0x483836
cmp ecx, 0x2b
je 0x483836
cmp ecx, 0x3f
je 0x483836
cmp ecx, 0x7b
je 0x483836
cmp ecx, 0x7d
jne 0x483814
test dword [esi + 0x50], ebp
jne 0x483814
push 6
jmp 0x4836fb
cmp ecx, 0x5d
jne 0x483825
test dword [esi + 0x50], ebp
jne 0x483825
push 4
jmp 0x4836fb
mov ax, word [esi + 0x4a]
lea ecx, [esi + 0x24]
call fcn.00483ef4
jmp 0x483716
push 0xa
call fcn.004c7cce
pop ecx
test bl, bl
je 0x483849
mov eax, esi
call fcn.00483e2c
mov ecx, dword [esi + 0x4c]
mov al, 1
mov bl, al
cmp ecx, edi
jne 0x4836dc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x48bd60
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x4dd6e5
call fcn.004ae200
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x48bd85
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x48bdcb
lea ecx, [ebp - 0x10]
call fcn.00402865
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0048a6f4
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00402883
mov eax, esi
call fcn.004ae2d8
ret 8

Function at 0x4916cf
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], ebx
je 0x491716
call fcn.0048b4c4
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x491716
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x491732
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.00491247
mov esi, eax
test edi, edi
je 0x491730
test ebx, ebx
je 0x491730
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x49299e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [edi + 0x58], ebx
test ebx, 0xffff0000
jne 0x4929c2
cmp dword [edi + 0x54], 0
jne 0x4929c2
movzx eax, bx
mov dword [edi + 0x54], eax
call fcn.0048b4c4
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push dword [ebp + 0xc]
mov ebx, eax
push ebx
mov ecx, edi
call fcn.0049295f
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x49a41f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x49a467
call fcn.0048b4c4
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x49a467
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x49a4aa
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
test ebx, ebx
je 0x49a493
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x49a493
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x49a4a7
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x4aa206
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x55c6c0]
jne 0x4aa210
repz ret
jmp fcn.004b196a
Function at 0x4bb64d
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004b12ce
and dword [ebp - 4], 0
cmp dword [0x564e78], 0
mov ebx, eax
jne 0x4bb6fe
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4bb7af
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x4bb7af
push eax
call fcn.004b125c
mov dword [esp], 0x51db18
push edi
mov dword [0x564e78], eax
call esi
push eax
call fcn.004b125c
mov dword [esp], 0x51db04
push edi
mov dword [0x564e7c], eax
call esi
push eax
call fcn.004b125c
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x564e80], eax
call esi
push eax
call fcn.004b125c
pop ecx
mov dword [0x564e88], eax
test eax, eax
je 0x4bb6fe
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004b125c
pop ecx
mov dword [0x564e84], eax
mov eax, dword [0x564e84]
cmp eax, ebx
je 0x4bb756
cmp dword [0x564e88], ebx
je 0x4bb756
push eax
call fcn.004b12d7
push dword [0x564e88]
mov esi, eax
call fcn.004b12d7
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4bb756
test edi, edi
je 0x4bb756
call esi
test eax, eax
je 0x4bb74d
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4bb74d
test byte [ebp - 0xc], 1
jne 0x4bb756
or dword [ebp + 0x10], 0x200000
jmp 0x4bb78f
mov eax, dword [0x564e7c]
cmp eax, ebx
je 0x4bb78f
push eax
call fcn.004b12d7
pop ecx
test eax, eax
je 0x4bb78f
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4bb78f
mov eax, dword [0x564e80]
cmp eax, ebx
je 0x4bb78f
push eax
call fcn.004b12d7
pop ecx
test eax, eax
je 0x4bb78f
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x564e78]
call fcn.004b12d7
pop ecx
test eax, eax
je 0x4bb7af
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4bb7b1
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4c7495
Capabilities:
Write file on windows

Disassembly:
push 0x48
mov eax, 0x4ca8b6
call fcn.004ae269
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x3c], ebx
je 0x4c75a7
cmp byte [esi + 0x42], bl
je 0x4c75a7
mov eax, dword [esi]
mov edi, 0xffff
push edi
call dword [eax + 4]
movzx eax, ax
cmp di, ax
jne 0x4c74d1
xor al, al
jmp 0x4c75a9
push ebx
push 8
lea ecx, [ebp - 0x2c]
call fcn.004c61b4
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004c5f64
mov ecx, eax
call fcn.004c57b3
mov edi, dword [ebp - 0x18]
mov ebx, eax
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004c5f64
mov ecx, eax
call fcn.004c57b3
mov ecx, dword [esi + 0x3c]
mov edx, dword [ecx]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x30]
push eax
add edi, ebx
push edi
push dword [ebp - 0x34]
lea eax, [esi + 0x44]
push eax
call dword [edx + 0x18]
sub eax, 0
je 0x4c7541
dec eax
je 0x4c7545
dec eax
dec eax
je 0x4c75a3
xor bl, bl
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.00441a7a
mov al, bl
jmp 0x4c75a9
mov byte [esi + 0x42], 0
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004c5f64
mov ecx, eax
call fcn.004c57b3
mov edi, dword [ebp - 0x30]
sub edi, eax
je 0x4c7585
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004c5f64
mov ecx, eax
call fcn.004c57b3
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.004c881b
add esp, 0x10
cmp edi, eax
jne 0x4c752f
cmp byte [esi + 0x42], 0
je 0x4c75a3
test edi, edi
jne 0x4c74df
push edi
push 8
lea ecx, [ebp - 0x2c]
call fcn.004c5f88
jmp 0x4c74df
mov bl, 1
jmp 0x4c7531
mov al, 1
call fcn.004ae2ec
ret
Function at 0x40723e
Capabilities:
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
and dword [ebp - 0x14], 0
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x38], edi
mov eax, dword [edi]
mov dword [ebp - 8], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
mov dword [ebp - 0x30], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x34], eax
call fcn.00407182
mov ebx, dword [ebp - 0x14]
mov eax, dword [esi + 8]
add ebx, 0x23f
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0xc]
push 0x20
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], eax
pop edi
mov dword [ebp - 0x20], 2
add dword [ebp - 0x20], 3
mov esi, dword [ebp - 8]
mov eax, esi
mov ecx, dword [0x7145d4]
shl eax, 4
mov dword [ebp - 4], eax
cmp ecx, 0xc
jne 0x4072c9
push 0x401124
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ecx, dword [0x7145d4]
mov edx, dword [ebp - 0x1c]
add eax, dword [ebp - 0x28]
cmp ecx, 0xfa9
mov dword [ebp - 4], eax
mov eax, dword [0x714618]
mov dword [ebp - 0x24], 0xedeb2e40
cmove eax, dword [ebp - 0x24]
and dword [ebp - 0x24], 0
cmp ecx, 0x3eb
mov dword [0x714618], eax
mov eax, dword [0x714620]
cmove eax, dword [ebp - 0x24]
mov dword [0x714620], eax
lea eax, [ebx + esi]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 8]
shr eax, 5
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
and dword [ebp - 0x18], 0
mov dword [0x71461c], 0xf4ea3dee
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
xor dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
xor eax, dword [ebp - 0x1c]
sub edx, eax
mov dword [ebp - 0x10], eax
mov eax, edx
mov dword [ebp - 0x1c], edx
shl eax, 4
mov dword [ebp - 0x18], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x30]
add dword [ebp - 4], eax
and dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x14]
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
nop
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x20]
mov eax, edx
shr eax, cl
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x10], eax
xor eax, dword [ebp - 0x24]
xor dword [ebp - 4], eax
mov eax, dword [ebp - 4]
sub dword [ebp - 8], eax
add ebx, 0x61c88647
mov dword [ebp - 0x14], ebx
dec edi
jne 0x40728e
mov edi, dword [ebp - 0x38]
mov eax, dword [ebp - 8]
mov dword [edi], eax
mov dword [edi + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4073a8
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, edx
shr esi, 3
push edi
mov edi, ecx
test esi, esi
je 0x4073e6
cmp dword [0x7145d4], 0x959
jne 0x4073d6
push 0
call dword [sym.imp.KERNEL32.dll_AttachConsole]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov edx, dword [ebp + 8]
mov ecx, edi
call fcn.0040723e
add edi, 8
dec esi
jne 0x4073b8
pop edi
pop esi
pop ebp
ret 4
Function at 0x410b9f
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x435900]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0040a7d3
mov dword [ebp - 0x14], eax
cmp dword [0x7153b4], esi
jne 0x410c92
push 0x800
push esi
push 0x40511c
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x410c1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x410d72
push esi
push esi
push 0x40511c
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x410d72
push 0x405134
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x410d72
push eax
call ebx
push 0x405140
push edi
mov dword [0x7153b4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x405150
push edi
mov dword [0x7153b8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x405164
push edi
mov dword [0x7153bc], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x7153c4], eax
test eax, eax
je 0x410c8f
push 0x405180
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x7153c0], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x410cb7
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x410caa
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x410ccc
push 4
pop eax
jmp 0x410d74
cmp dword [ebp - 0x14], esi
je 0x410ccc
push dword [0x7153b4]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x410cb1
mov eax, dword [0x7153c0]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x410d2a
cmp dword [0x7153c4], edi
je 0x410d2a
push eax
call ebx
push dword [0x7153c4]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x410d2a
test eax, eax
je 0x410d2a
call ecx
test eax, eax
je 0x410d1f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x410d1f
test byte [ebp - 8], 1
jne 0x410d2a
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x410d5a
mov eax, dword [0x7153b8]
cmp eax, edi
je 0x410d57
push eax
call ebx
test eax, eax
je 0x410d57
call eax
mov esi, eax
test esi, esi
je 0x410d57
mov eax, dword [0x7153bc]
cmp eax, edi
je 0x410d57
push eax
call ebx
test eax, eax
je 0x410d57
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x7153b4]
call ebx
test eax, eax
je 0x410d72
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x410d74
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409e0e
mov esp, ebp
pop ebp
ret
Function at 0x401090
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
lea edx, [ebp + 0xc]
call fcn.004025f0
mov ecx, 2
jmp fcn.00402840

Function at 0x4010b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push ecx
push str.Dump____s_n
mov edi, edx
call fcn.00402680
mov esi, dword [ebp + 8]
add esp, 8
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
xor ebx, ebx
test esi, esi
jle 0x40111c
test ebx, ebx
je 0x401100
test bl, 0xf
jne 0x401100
push 0
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xa
push ecx
push 1
lea ecx, [ebp - 4]
mov dword [ebp + 8], 1
push ecx
push dword [0x4050a4]
call eax
movzx eax, byte [ebx + edi]
push eax
push 0x403410
call fcn.00402680
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
inc ebx
add esp, 8
cmp ebx, esi
jl 0x4010d5
push 0
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xa
push ecx
push 1
lea ecx, [ebp - 4]
mov dword [ebp + 8], 1
push ecx
push dword [0x4050a4]
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4013a0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, edx
mov edx, 0x40359c
push esi
push edi
mov ecx, dword [ebx]
call fcn.00402510
mov dword [ebp - 8], eax
test eax, eax
je 0x401473
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 1
jl 0x40148b
lea eax, [esi + 0x3f]
and eax, 0xffffffc0
mov dword [ebx + 8], eax
cmp esi, eax
jle 0x4013e9
mov dword [ebx + 8], esi
mov eax, esi
cmp eax, dword [ebx + 0xc]
jg 0x401495
push eax
push 8
push dword [0x4050a0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x40149f
mov ecx, dword [ebx + 8]
mov edi, eax
mov dword [ebx + 0x10], eax
or al, 0xff
rep stosb byte es:[edi], al
mov edi, dword [ebp - 8]
lea eax, [ebp - 4]
push 0
push eax
push esi
push dword [ebx + 0x10]
mov dword [ebp - 4], 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401469
mov eax, dword [ebp - 4]
xor edx, edx
div esi
cmp eax, 1
jne 0x401469
mov eax, dword [edi]
test eax, eax
je 0x401453
cmp eax, 0xffffffff
je 0x401453
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push 0
push dword [0x4050a0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Cant_read_firmware_file._n
call fcn.00401090
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.004025b0
push eax
push str.Cant_open_firmware_file:__s_n
call fcn.00401090
push str.Cant_get_firmware_file_size._n
call fcn.00401090
push str.Firmware_cannot_fit_in_flash._n
call fcn.00401090
push str.Memory_allocation_error_n
call fcn.00401090
int3
Function at 0x4015d0
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x405010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0xc]
push esi
mov esi, dword [ebx + 8]
push edi
mov dword [ebp - 0x60], eax
xor eax, eax
push 0x38
push eax
mov word [ebp - 0x43], ax
mov dword [ebp - 0x41], eax
mov byte [ebp - 0x3d], al
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x5c], esi
mov byte [ebp - 0x44], dl
call sub.ntdll.dll_memset
mov esi, dword [esi + 8]
mov eax, 0x92492493
imul esi
xor edi, edi
mov dword [ebp - 0x54], esi
add edx, esi
mov dword [ebp - 0x48], edi
sar edx, 0xa
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x4c], eax
shr ecx, 0x1f
add esp, 0xc
add ecx, edx
mov dword [ebp - 0x70], ecx
test esi, esi
je 0x401708
cmp byte [ebx + 0x10], 0
je 0x40169a
inc eax
mov dword [ebp - 0x4c], eax
cmp eax, ecx
jle 0x40169a
push 0
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x4c], 0
push eax
push 1
lea eax, [ebp - 0x50]
mov dword [ebp - 0x50], 0x2e
push eax
push dword [0x4050a4]
mov dword [ebp - 0x6c], 1
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [0x4050a4]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, 0x38
mov dword [ebp - 0x41], edi
cmp esi, ecx
lea edx, [ebp - 0x44]
push 6
cmovl ecx, esi
mov dword [ebp - 0x50], ecx
lea eax, [ecx + 5]
mov word [ebp - 0x43], ax
mov eax, dword [ebp - 0x5c]
mov esi, dword [eax + 0x10]
lea eax, [ebp - 0x66]
add esi, edi
lea edi, [ebp - 0x3c]
push eax
rep movsb byte es:[edi], byte [esi]
movzx eax, word [ebp - 0x43]
mov ecx, dword [ebp - 0x58]
add eax, 3
push eax
call fcn.004012b0
test eax, eax
jne 0x401786
mov cx, word [ebp - 0x62]
test cx, cx
jne 0x401744
mov esi, dword [ebp - 0x54]
mov edi, dword [ebp - 0x48]
sub esi, dword [ebp - 0x50]
add edi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x48], edi
test esi, esi
jne 0x401653
cmp dword [ebp - 0x74], 0xa5
jne 0x401764
mov ecx, dword [ebp - 0x58]
mov eax, dword [ecx]
cmp byte [eax + 0x15], 0
je 0x401764
mov eax, dword [ebp - 0x5c]
lea edx, [ebp - 0x44]
push 6
mov eax, dword [eax + 8]
mov dword [ebp - 0x41], eax
mov eax, 5
mov word [ebp - 0x43], ax
lea eax, [ebp - 0x66]
push eax
push 8
call fcn.004012b0
test eax, eax
jne 0x40177b
jmp 0x401751
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x48]
mov dword [edx], eax
movzx eax, cx
jmp 0x401766
mov ax, word [ebp - 0x62]
test ax, ax
je 0x401764
mov edx, dword [ebp - 0x60]
movzx eax, ax
mov dword [edx], edi
jmp 0x401766
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004028b0
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc
push edi
push str.failure_at_offset__d._n
call fcn.00401090
mov eax, dword [ebp - 0x48]
push eax
push str.failure_at_offset__d._n
call fcn.00401090
int3
Function at 0x4017a0
Capabilities:
Terminate process

Disassembly:
push str.USB_programmer_for_WCH_MCUs_n
call fcn.00402680
push str.Options:_n
call fcn.00402680
push str.___f__filename___write_code_flash_n
call fcn.00402680
push str.___c__filename___verify_code_flash_n
call fcn.00402680
push str.___k__filename___write_data_flash_n
call fcn.00402680
push str.___l__filename___verify_data_flash_n
call fcn.00402680
push str.___m__filename___dump_data_flash_to_file_n
call fcn.00402680
push str.___w__wait_for_device_to_connect_n
call fcn.00402680
push str.___n__do_not_device_reset_after_flashing_n
call fcn.00402680
push str.___d__debug_traces_n
call fcn.00402680
add esp, 0x28
mov ecx, 5
jmp fcn.00402840
Function at 0x4025f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x405010]
xor eax, ebp
mov dword [ebp - 4], eax
push edx
push ecx
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.ntdll.dll_vsprintf]
add esp, 0xc
mov dword [ebp - 0x88], eax
lea ecx, [ebp - 0x88]
push 0
push ecx
push eax
lea eax, [ebp - 0x84]
push eax
push dword [0x4050a4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x88]
xor ecx, ebp
call fcn.004028b0
mov esp, ebp
pop ebp
ret

Function at 0x402680
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x405010]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.ntdll.dll_vsprintf]
add esp, 0xc
mov dword [ebp - 0x88], eax
lea ecx, [ebp - 0x88]
push 0
push ecx
push eax
lea eax, [ebp - 0x84]
push eax
push dword [0x4050a4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x88]
xor ecx, ebp
call fcn.004028b0
mov esp, ebp
pop ebp
ret

Function at 0x4028d0
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov eax, dword [esi]
cmp eax, 0xfffffffe
je 0x4028f1
mov ecx, dword [esi + 4]
add ecx, edi
xor ecx, dword [eax + edi]
call fcn.004028b0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
add ecx, edi
xor ecx, dword [eax + edi]
pop edi
pop esi
pop ebp
jmp fcn.004028b0