joyce8/EMBER2024-capa huggingface dataset:
Function at 0xdfbf10
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0xe109fb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov esi, dword [esp + 0x2c]
xor ebp, ebp
mov dword [esp + 0x10], eax
xor ebx, ebx
mov eax, 1
mov ecx, ebx
shl eax, cl
mov ecx, dword [esp + 0x10]
test ecx, eax
je 0xdfc002
lea edx, [ebx + 0x41]
lea eax, [esp + 0x14]
push edx
push str._c:_
push eax
call fcn.00dffdff
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0xdfc002
lea edx, [esp + 0x14]
push edx
push str.Mounting__s_n
call fcn.00df76e0
lea eax, [esp + 0x1c]
lea edi, [esi + 0x1048]
push eax
push edi
mov word [esp + 0x28], bp
call fcn.00e0020b
push 0x10
call fcn.00e001d3
add esp, 0x14
mov dword [esp + 0x2c], eax
cmp eax, ebp
mov dword [esp + 0x24], ebp
je 0xdfbfc5
mov cx, word [edi]
push ecx
mov ecx, eax
call fcn.00dec1c0
jmp 0xdfbfc7
xor eax, eax
push esi
mov dword [esp + 0x28], 0xffffffff
mov dword [esi], eax
call fcn.00dfbb80
mov edi, dword [esi]
add esp, 4
cmp edi, ebp
je 0xdfbff0
mov ecx, edi
call fcn.00dec2c0
push edi
call fcn.00e001c8
add esp, 4
mov edx, dword [esi + 0x1024]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0xdfc021
inc ebx
cmp ebx, 0x20
jb 0xdfbf3e
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0xdfd250
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xe11808
push 0xe01288
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ebx
xor esi, esi
mov dword [ebp - 0x20], esi
mov byte [ebp - 0x24], bl
mov dword [ebp - 4], ebx
mov byte [ebp - 0x34], bl
mov byte [ebp - 0x33], bl
mov byte [ebp - 0x32], bl
mov byte [ebp - 0x31], bl
mov byte [ebp - 0x30], bl
mov byte [ebp - 0x2f], 5
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea ecx, [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0xdfd329
lea edx, [ebp - 0x28]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0xdfd329
mov dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push 1
mov ecx, dword [ebp - 0x28]
push ecx
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
call edi
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00e001d3
add esp, 4
mov esi, eax
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x20], esi
cmp esi, ebx
je 0xdfd329
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
push esi
push 1
mov edx, dword [ebp - 0x28]
push edx
call edi
test eax, eax
je 0xdfd329
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [esi]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0x24], al
jmp 0xdfd32c
mov al, byte [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.00dfd351
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0xdfdd20
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov edx, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
mov dword [esp + 0x1c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0xdfdd58
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esi], ecx
mov dword [esi + 4], edx
pop esi
pop ecx
ret 0x10

Function at 0xdfdd60
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0xdfdd94
mov eax, dword [esp + 0x14]
test eax, eax
je 0xdfdd94
push eax
push esi
call fcn.00e0020b
add esp, 8
pop esi
ret 0x10

Function at 0xdfdda0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x24
lea eax, [esp + 0x28]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0xdfde22
push ebx
mov ebx, dword [esp + 0x30]
push esi
xor esi, esi
test ebx, ebx
jbe 0xdfde15
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov edi, dword [esp + 0x40]
push esi
lea ecx, [esp + 0x18]
push 0xe16320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00dffdff
mov ecx, dword [esp + 0x44]
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push edi
push 0
push 0
push eax
push ecx
call ebp
inc esi
add edi, 4
cmp esi, ebx
jb 0xdfddda
pop edi
pop ebp
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
add esp, 0x24
ret 0xc

Function at 0xdfde30
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x28
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0xdfdec2
push ebp
mov ebp, dword [esp + 0x34]
push esi
xor esi, esi
test ebp, ebp
jbe 0xdfdeb5
push ebx
mov ebx, dword [esp + 0x40]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
lea ecx, [esp + 0x1c]
push 0xe16320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00dffdff
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x40]
push eax
push 0
push 0
push ecx
push edx
call edi
test eax, eax
jne 0xdfdeab
mov ax, word [esp + 0x14]
mov word [ebx], ax
inc esi
add ebx, 2
cmp esi, ebp
jb 0xdfde6a
pop edi
pop ebx
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
add esp, 0x28
ret 0xc
Function at 0xdfe000
Capabilities:
Get file version info

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
je 0xdfe131
push esi
call fcn.00e01145
add esp, 4
mov edi, eax
push edi
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push ebx
call fcn.00df0080
mov ebp, eax
add esp, 0x1c
cmp ebp, 0xffffffff
je 0xdfe131
push 0
push ebp
call fcn.00df03a0
push 0
push 0
push 0
push 4
push 0
push ebp
mov ebx, eax
call fcn.00df0260
add esp, 0x20
mov dword [esp + 0x18], eax
test eax, eax
jne 0xdfe08b
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0
push 0
push 0
push 6
push eax
call fcn.00df02f0
mov esi, eax
add esp, 0x14
test esi, esi
je 0xdfe121
push 0xe16918
push edi
call fcn.00dff3f0
push eax
push ebx
push esi
call fcn.00dfdf60
push 0xe168f8
push edi
call fcn.00dff3f0
push eax
push ebx
push esi
call fcn.00dfdf60
push 0xe168d8
push edi
call fcn.00dff3f0
push eax
push ebx
push esi
call fcn.00dfdf60
push 0xe168c0
push edi
call fcn.00dff3f0
add esp, 0x44
push eax
push ebx
push esi
call fcn.00dfdf60
push 0xe168a0
push edi
call fcn.00dff3f0
push eax
push ebx
push esi
call fcn.00dfdf60
push 0xe16888
push edi
call fcn.00dff3f0
push eax
push ebx
push esi
call fcn.00dfdf60
add esp, 0x34
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0xdff1b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.00dff140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.00dff140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.00dff140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.00dff140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0xdffbfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0xdffc50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0xe1187c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0xdffc43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0xdffc52
xor eax, eax
pop esi
leave
ret 4
Function at 0x4b10e0
Capabilities:
Encode data using xor

Disassembly:
dec esp
pushal
mov eax, 0x45bf57b
insb byte es:[edi], dx
mov bh, byte [ebx - 0x1b9cc49]
imul ebx, dword [ecx - 6], 0x4da8eeae
mov eax, 0xc7b433b7
out 0x30, eax
invalid

Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
nop
nop
nop
nop
pop eax
nop
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x433030
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
jne 0x43301e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219

Function at 0x100f74a0
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp word [eax], 0x5a4d
je 0x100f74b3
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], 0x4550
jne 0x100f74cb
cmp word [ecx + 0x18], 0x10b
sete al
pop ebp
ret

Function at 0x100f74e0
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
push ebx
movzx ebx, word [ecx + 6]
push esi
xor esi, esi
push edi
lea edx, [eax + ecx + 0x18]
test ebx, ebx
je 0x100f751d
mov edi, dword [ebp + 0xc]
mov ecx, dword [edx + 0xc]
cmp edi, ecx
jb 0x100f7515
mov eax, dword [edx + 8]
add eax, ecx
cmp edi, eax
jb 0x100f7524
inc esi
add edx, 0x28
cmp esi, ebx
jb 0x100f7505
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
pop edi
pop esi
mov eax, edx
pop ebx
pop ebp
ret

Function at 0x100f9147
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push esi
push 0x10085744
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 0x1c], eax
test eax, eax
jne 0x100f9178
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100f920a
and eax, 0xffff
or eax, 0x80070000
pop esi
ret
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10085738
push eax
call edi
mov dword [esi], eax
test eax, eax
je 0x100f91f7
push 0x1008572c
push dword [esi + 0x1c]
call edi
mov dword [esi + 4], eax
test eax, eax
je 0x100f91f7
push 0x1008571c
push dword [esi + 0x1c]
call edi
mov dword [esi + 8], eax
test eax, eax
je 0x100f91f7
push 0x10085710
push dword [esi + 0x1c]
call edi
mov dword [esi + 0xc], eax
test eax, eax
je 0x100f91f7
push 0x10085704
push dword [esi + 0x1c]
call edi
mov dword [esi + 0x10], eax
test eax, eax
je 0x100f91f7
push 0x100856fc
push dword [esi + 0x1c]
call edi
mov dword [esi + 0x14], eax
test eax, eax
je 0x100f91f7
push 0x100856f0
push dword [esi + 0x1c]
call edi
mov dword [esi + 0x18], eax
test eax, eax
je 0x100f91f7
xor eax, eax
jmp 0x100f9209
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
and dword [esi + 0x1c], 0
mov eax, 0x80004005
pop edi
pop esi
ret
Function at 0xc3650d
Capabilities:
Encode data using xor

Disassembly:
xor al, al
mov al, byte [edi]
xor al, bl
mov byte [edi], al
inc edi
cmp edi, ecx
jne fcn.00c3650d
ret
Function at 0x44b6d0
Capabilities:
Get keyboard layout

Disassembly:
mov al, byte [0x65f049]
mov cl, byte [0x65f044]
and al, cl
mov edx, dword [0x65f034]
or al, 0x26
push esi
mov byte [0x65f044], al
mov eax, dword [0x65f03c]
mov ecx, eax
push edi
mov edi, dword [0x65f038]
and edx, 8
shl ecx, 4
and edi, ecx
xor ecx, ecx
mov cl, byte [0x65f045]
mov dword [0x65f038], edi
imul edx, ecx
or eax, edx
mov dword [0x65f03c], eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, dword [esp + 0xc]
mov dword [0x662aac], eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov edi, eax
call fcn.0044b610
push edi
push esi
push 0x11
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
mov eax, dword [esp + 0xc]
pop edi
pop esi
ret

Function at 0x488d00
Capabilities:
Encode data using xor

Disassembly:
xor dword [eax], 0x67536a1f
mov cl, 0xa
adc ebp, dword [ecx + 0x5a]
mov dword [eax - 0xffd8be9], eax
adc byte [eax], 0x8e
sub esi, dword [edi]
adc byte [edx + 0x62], dh
stc
pop edx
sub ecx, dword [eax + 0x64]
shr dword [esi], cl
and al, 0x12
jnp 0x488d42
sahf
cli
scasd eax, dword es:[edi]
lahf
or eax, 0xc15bdd8e
fninit
and edx, edx
inc ebx
adc eax, 0x347b294b
jecxz 0x488d53
rol byte [ebx + 0x15], cl
dec ebx
sub dword [ebx + 0x34], edi
invalid
xor byte [edi], ch
mov dl, byte [edx - 0x5e]
sahf
mov bh, 0x69
dec ebx
and byte [esi - 0x5a], bh
les ecx, [ebx + 0x25]
std
adc dl, al
adc ch, byte [ecx + 0x3f]
or al, 0xfe
mov cl, 0x5a
pop eax
push esi
sbb esp, dword [esi + 0x2d542a7c]
jns 0x488d2e
ret 0x6912
mov byte ds:[0xe6c35323], al
inc edx
cmpsb byte [esi], byte es:[edi]
sub al, 0x55
stc
std
mov eax, dword [ecx]
jmp 0x50c81935

Function at 0x4891ec
Capabilities:
Encode data using xor

Disassembly:
mov dh, dl
mov edx, 0x4d12b200
pop ds
xchg dword [edx - 0x2e], esp
call 0xc328034f
rol dword [edx], cl
sub dword [ecx + 0x10], eax
jge 0x48920d
nop
sbb al, ah
xor byte [ecx], dl
inc edx
push edi
inc edx
ficom dword [ebp - 0x9280232]
insb byte es:[edi], dx
lahf
sti
xchg ebp, eax
into
std
xlatb
imul byte [edi + ebx*4 - 5]
xor dword [esi], 0xffffffa3
jb 0x489204
sub byte [ecx], bh
xor dword [edi - 0x10c5ccee], esi
adc cl, byte [ecx + 0x52]
loop 0x48923a
or byte [edx - 0x2094016e], 0xff
cdq
mov dword [edx - 0x7e], esp
mov al, byte [0x3ec51956]
ret
xchg edx, eax
popal
push 0xffffffffffffffde
adc al, byte [edi]
mov dl, 0x6d
jl 0x4891f4
cmp ebx, eax
retf
Function at 0x52a235
Capabilities:
Encode data using xor

Disassembly:
out dx, eax
repne cmpsd dword [esi], dword es:[edi]
rcr eax, cl
iretd
push ebp
jp 0x52a229
mov esi, 0x9a02d78f
xchg dword [ebp - 0x58ef3c3a], esi
ja 0x52a16a
xlatb
add bl, byte [edx - 0x3c394a79]
adc byte [edi + 0x3d418177], ah
add byte [ebx - 0x26288ba1], ah
xor al, 0xd0
inc ecx
cmp eax, 0x745fa300
xlatb
fnstenv [eax + edx*8]
and byte [edx - 0x3953ccaa], 0x72
imul dword [ebx - 0x1f]
adc byte ds:[ebx - 0x7e065650], ah
mov byte [0xc6ac3356], al
jb 0x52a1f3
imul esp, ecx, 0x3e
adc byte [ebx - 0x7e065650], ah
movsd dword es:[edi], dword [esi]
pop ss
adc eax, ebx
pop ss
rcr dword [ecx + 0x560340c8], 0xf5
cmp eax, 0x97376a20
sbb ebx, dword [eax + 0x2140381]
cmpsb byte [esi], byte es:[edi]
rol dword [ecx + ebx + 0x6f02b414], cl
ror al, cl
push esp
mov ecx, 0x65fad9be
xor dh, byte [ebx + 0x6cb4f2ec]
fsqrt
xor dh, byte gs:[ebx + 0x6cb4f2ec]
fisttp dword [ecx - 0x7a4d6b17]
loop 0x52a1f5
dec esp
cdq
inc esi
fbstp tbyte [esi + 0x2b87a44e]
mov edx, 0xc6829110
cmc
inc esp
add eax, 0x5db6bb20
sbb al, 0xc7
or dword [edi + 0x3b], eax
jno 0x52a1d9
mov esi, fs
pop ecx
inc ebp
jne 0x52a2c1
dec esp
fsubrp st(0)
imul edi, edi, 0x17cec682
mov ds, word [edi - 0x19]
xchg edx, eax
invalid
leave
mov ah, 0xb8
retf 0x8895

Function at 0x568e11
Capabilities:
Encode data using xor

Disassembly:
fstp qword [ebx - 0x33]
and byte [ebx - 0x22939551], ch
inc edx
and dh, byte [edi + 0x4c]
in eax, dx
xchg ecx, eax
mov bl, 0x5a
call 0xbd40006
or byte [ecx + 0x5f], bl
cmp ebp, dword [ebx]
cmpsb byte [esi], byte es:[edi]
fbstp tbyte [esi + ecx*4 - 0x771c12b5]
pop ss
xor byte [edx - 0x37], 0x54
push cs
invalid
Function at 0x65793d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x65f398
cmp edx, dword [eax]
je 0x65795f
add eax, 8
inc ecx
cmp eax, 0x65f428
jl 0x657950
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x65f398]
jne 0x657a8d
mov eax, dword [0xa5bcf4]
cmp eax, 1
je 0x657a67
test eax, eax
jne 0x657990
cmp dword [0x65f2c4], 1
je 0x657a67
cmp edx, 0xfc
je 0x657a8d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x6579c7
lea eax, [ebp - 0x1a4]
push 0x65c9d8
push eax
call fcn.00658320
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.006587b0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x657a0a
lea eax, [ebp - 0x1a4]
push eax
call fcn.006587b0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x65c9d4
push edi
call fcn.0065a680
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x65c9b8
push eax
call fcn.00658320
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00658330
lea eax, [ebp - 0xa0]
push 0x65c9b4
push eax
call fcn.00658330
push dword [esi + 0x65f39c]
lea eax, [ebp - 0xa0]
push eax
call fcn.00658330
push 0x12010
lea eax, [ebp - 0xa0]
push 0x65c98c
push eax
call fcn.0065a5f4
add esp, 0x2c
pop edi
jmp 0x657a8d
lea eax, [ebp + 8]
lea esi, [esi + 0x65f39c]
push 0
push eax
push dword [esi]
call fcn.006587b0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x523f90
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xcf000]
push edi
jmp 0x523faa
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x523fb1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x523fa0
mov eax, 1
add ebx, ebx
jne 0x523fc3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x523fd4
jne 0x523ff3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x523ff3
dec eax
add ebx, ebx
jne 0x523fe0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x523fb8
add ebx, ebx
jne 0x523fef
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x524045
xor ecx, ecx
sub eax, 3
jb 0x52400b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x52407a
sar eax, 1
mov ebp, eax
jmp 0x524016
add ebx, ebx
jne 0x524016
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x523fe4
inc ecx
add ebx, ebx
jne 0x524024
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x523fe4
add ebx, ebx
jne 0x524031
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x524026
jne 0x524042
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x524026
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x524064
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x524056
jmp 0x523fa6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x524064
add edi, ecx
jmp 0x523fa6
pop esi
mov edi, esi
mov ecx, 0x3ed9
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x524082
cmp byte [edi], 0x11
jne 0x524082
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x524087
lea edi, [esi + 0x11c000]
mov eax, dword [edi]
or eax, eax
je 0x5240ff
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x16f36c]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x16f4e8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x5240b4
mov ecx, edi
jns 0x5240e3
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x16f4ec]
or eax, eax
je 0x5240f9
mov dword [ebx], eax
add ebx, 4
jmp 0x5240d1
call dword [esi + 0x16f4fc]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x524130
cmp al, 0xef
ja 0x524123
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x524105
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x524112
mov ebp, dword [esi + 0x16f4f0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x227]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x524164
sub esp, 0xffffff80
jmp 0x425f74
Function at 0x401a21
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x50
push ebp
lea eax, [esp + 0x28]
push edi
push eax
call fcn.00401bd1
mov ecx, dword [esp + 0x5c]
xor edx, edx
xor ebp, ebp
mov dword [esp + 0xc], 1
mov edi, dword [ecx]
mov dword [esp + 0x10], 8
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], 4
mov dx, word [edi + 0x14]
cmp word [edi + 6], bp
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x20], 0x80
mov dword [esp + 0x24], 0x20
mov dword [esp + 0x28], 0x40
lea eax, [edx + edi + 0x18]
jbe 0x401b1f
push ebx
push esi
lea ebx, [eax + 0x24]
mov eax, dword [ebx]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x401ac2
mov eax, dword [ebx - 0x14]
mov ecx, dword [ebx - 0x1c]
push 0x4000
push eax
push ecx
call dword [esp + 0x4c]
jmp 0x401b05
lea edx, [edx + ecx*2]
test eax, 0x4000000
lea ecx, [esi + edx*2]
mov esi, dword [esp + ecx*4 + 0x14]
je 0x401ad9
or esi, 0x200
mov edx, dword [ebx - 0x14]
mov ecx, edx
test ecx, ecx
jne 0x401af4
test al, 0x40
je 0x401aeb
mov ecx, dword [edi + 0x20]
jmp 0x401af2
test al, 0x80
je 0x401b05
mov ecx, dword [edi + 0x24]
test ecx, ecx
jbe 0x401b05
mov ecx, dword [ebx - 0x1c]
lea eax, [esp + 0x10]
push eax
push esi
push edx
push ecx
call dword [esp + 0x44]
mov edx, dword [esp + 0x64]
xor eax, eax
inc ebp
add ebx, 0x28
mov edi, dword [edx]
mov ax, word [edi + 6]
cmp ebp, eax
jl 0x401a91
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x50
ret