joyce8/EMBER2024-capa huggingface dataset:
Function at 0x44f420
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
call fcn.0044f570
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi], eax
cmp eax, 0xffffffff
pop esi
jne 0x44f440
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push 4
push ecx
push 0x1001
push 0xffff
push eax
mov dword [esp + 0x14], 0
call sub.WS2_32.dll_setsockopt
mov eax, 1
pop ecx
ret

Function at 0x44f421
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
call fcn.0044f570
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi], eax
cmp eax, 0xffffffff
pop esi
jne 0x44f440
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push 4
push ecx
push 0x1001
push 0xffff
push eax
mov dword [esp + 0x14], 0
call sub.WS2_32.dll_setsockopt
mov eax, 1
pop ecx
ret

Function at 0x44f470
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
xor eax, eax
push esi
push edi
mov dword [esp + 8], eax
mov edi, ecx
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], eax
push ecx
mov dword [esp + 0x18], eax
mov word [esp + 0xc], 2
call sub.WS2_32.dll_htons
mov esi, dword [esp + 0x1c]
mov word [esp + 0xa], ax
push esi
call sub.WS2_32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x44f4c7
push esi
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x44f4dd
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
lea edx, [esp + 8]
push 0x10
push edx
mov ecx, edi
call fcn.0044f500
pop edi
pop esi
add esp, 0x10
ret 8
push 0x2726
call sub.WS2_32.dll_WSASetLastError
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 8

Function at 0x44f500
Capabilities:
Connect socket

Disassembly:
mov eax, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
mov eax, dword [ecx]
push edx
push eax
call sub.WS2_32.dll_connect
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret 8

Function at 0x44f590
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x44f5d9
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4
Function at 0x44fa50
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x472990
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.0044f600
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.0044f680
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.0044f680
lea ecx, [esi + 0xc]
call fcn.00463ed9
lea ecx, [esi + 0x10]
call fcn.00463ed9
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.00451eb0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.00451eb0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.00451eb0
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.00463f4e
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.00463f4e
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret

Function at 0x4506f8
Capabilities:
Get hostname

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x472bb8
push eax
mov dword fs:[0], esp
sub esp, 0x64
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x450708
call fcn.00450c20
mov edi, dword [esp + 0x7c]
test edi, edi
je 0x4507eb
cmp byte [edi], 0
je 0x4507eb
mov eax, dword [esp + 0x8c]
test eax, eax
jg 0x45072d
mov eax, 0x7d0
mov ecx, esi
mov dword [esi + 8], eax
call fcn.0044f420
test eax, eax
jne 0x45074d
push 0x4e750c
lea ecx, [esi + 0x38]
call fcn.0046408b
jmp 0x4507eb
mov eax, dword [esp + 0x80]
mov ecx, esi
push eax
push edi
call fcn.0044f470
test eax, eax
jne 0x45077c
mov ecx, esi
call fcn.0044f570
push edi
add esi, 0x38
push 0x4e74e8
push esi
call fcn.00461eea
add esp, 0xc
jmp 0x4507eb
push 0xdc
mov ecx, esi
mov dword [esi + 4], 1
call fcn.004514a0
test eax, eax
je 0x4507e4
lea ecx, [esp + 8]
push 0x64
push ecx
call sub.WS2_32.dll_gethostname
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
lea edx, [esp + 0x8c]
mov dword [esp + 0x8c], 1
push edx
push eax
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.004508c0
test eax, eax
jne 0x450800
push edi
lea eax, [esi + 0x38]
push 0x4e74c4
push eax
call fcn.00461eea
add esp, 0xc
mov ecx, esi
call fcn.00450c20
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x4508a8
mov ecx, dword [0x4e777c]
mov dword [esp + 0x7c], ecx
lea edx, [esp + 8]
lea eax, [esp + 0x7c]
push edx
push str.HELO__s_r_n
push eax
mov dword [esp + 0x80], 0
call fcn.00461eea
mov edx, dword [esp + 0x88]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, esi
call fcn.0044f520
test eax, eax
jne 0x45086a
push 0x4e74a8
lea ecx, [esi + 0x38]
call fcn.0046408b
jmp 0x45087a
push 0xfa
mov ecx, esi
call fcn.004514a0
test eax, eax
jne 0x450897
mov ecx, esi
call fcn.00450c20
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.00463f4e
jmp 0x4507eb
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.00463f4e
mov ecx, dword [esp + 0x6c]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
Function at 0x4662f5
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x46632d
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004643a9
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00464381
jmp 0x466339
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4679e7
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x467a29
call fcn.0046d59f
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x467a29
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x467a20
xor eax, eax
jmp 0x467a31
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00467a37
pop edi
pop esi
pop ebx
ret 4

Function at 0x46dacf
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x46dafd
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x46db1b
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0046da35
jmp 0x46db1b
mov eax, dword [esi + 0x14]
test eax, eax
je 0x46db1b
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0046da35
test edi, edi
mov eax, edi
jne 0x46db05
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x431000
Capabilities:
Encode data using xor

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..idata
mov ebx, 0x40915c
nop
mov ecx, 0x61d7148b
nop
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x43104e
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x431024
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42f3f8
nop
nop
mov ecx, 0x2e5014d9
nop
nop
test eax, eax
nop
nop
je 0x431084
nop
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
add eax, 4
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x43106c
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x4013cf
Capabilities:
Encode data using xor

Disassembly:
jmp 0x411f5d
push esi
xor esi, esi
cmp dword [esp + 0xc], esi
jbe 0x412080
push ebx
push ebp
push edi
mov edi, dword [esp + 0x14]
mov ebx, str.Soviet_aristo_baristo
mov ebp, 0x503778
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0x71
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0xf0
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0xc2
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
xor byte [esi + edi], 0xee
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0x91
push ebx
push ebp
call fcn.00403490
add esp, 0x44
push eax
call fcn.004013b6
xor byte [esi + edi], 0x81
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0x1b
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0xbc
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
xor byte [esi + edi], 5
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
xor byte [esi + edi], 0x73
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0x92
add esp, 0x40
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0xef
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0xba
push ebx
push ebp
call fcn.00403490
push eax
call fcn.004013b6
add byte [esi + edi], 0xcf
add esp, 0x24
inc esi
cmp esi, dword [esp + 0x18]
jb 0x411f7b
pop edi
pop ebp
pop ebx
pop esi
ret

Function at 0x402946
Capabilities:
Resolve function by parsing pe exports

Disassembly:
jmp 0x412674
sub esp, 0x20
mov eax, dword [0x501358]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
xor ebp, ebp
push edi
mov eax, dword [esi + 0x3c]
mov edi, dword [eax + esi + 0x78]
add edi, esi
mov ebx, dword [edi + 0x20]
mov eax, dword [edi + 0x18]
add ebx, esi
mov dword [esp + 0x10], eax
test eax, eax
je 0x4126f3
mov eax, dword [ebx]
lea ecx, [esp + 0x14]
add eax, esi
push eax
call fcn.00401e2e
push str.Hardline
push 0x503860
call fcn.00402d60
push eax
call fcn.00406082
lea eax, [esp + 0x20]
push 0x36c
push eax
call fcn.00402cc5
add esp, 0x14
cmp eax, dword [esp + 0x38]
je 0x41270d
lea ecx, [esp + 0x14]
add ebx, 4
call fcn.00402982
inc ebp
cmp ebp, dword [esp + 0x10]
jb 0x4126a5
xor edi, edi
mov ecx, dword [esp + 0x2c]
lea eax, [esi + edi]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00403030
add esp, 0x20
ret 8
mov eax, dword [edi + 0x24]
lea eax, [eax + ebp*2]
movzx ecx, word [eax + esi]
mov eax, dword [edi + 0x1c]
lea eax, [eax + ecx*4]
mov edi, dword [eax + esi]
lea ecx, [esp + 0x14]
call fcn.00402982
jmp 0x4126f5
Function at 0x403300
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x4131b4], 0
jne 0x40330e
call fcn.004032d6
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push edi
test esi, esi
jbe 0x40333b
test cl, 7
je 0x40333b
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4131b0]
dec esi
inc ecx
jmp 0x40331c
cmp esi, 8
jb 0x4033bf
mov edi, esi
shr edi, 3
xor eax, dword [ecx]
add ecx, 8
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4131b0]
sub esi, 8
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4131b0]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4131b0]
mov edx, eax
movzx eax, dl
mov eax, dword [eax*4 + 0x4131b0]
xor eax, dword [ecx - 4]
shr edx, 8
xor eax, edx
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4131b0]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4131b0]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4131b0]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x4131b0]
dec edi
jne 0x403345
xor edx, edx
test esi, esi
jbe 0x4033df
push ebx
movzx edi, byte [edx + ecx]
movzx ebx, al
xor edi, ebx
shr eax, 8
xor eax, dword [edi*4 + 0x4131b0]
inc edx
cmp edx, esi
jb 0x4033c6
pop ebx
pop edi
pop esi
ret 0xc

Function at 0x405391
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x24c0
call fcn.00401200
push ebx
push esi
push edi
lea ecx, [ebp - 0x24c0]
call fcn.00403bbd
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
lea eax, [ebp - 0x24c0]
push eax
push dword [ebp + 0xc]
push edi
call fcn.00406830
test al, al
je 0x40552a
cmp byte [ebp - 0x24c0], bl
je 0x40552a
cmp byte [ebp - 0x1840], bl
je 0x40552a
lea eax, [ebp - 0x1840]
push eax
lea eax, [ebp - 0x24c0]
push eax
call fcn.00407945
push eax
call fcn.0040b0df
test eax, eax
je 0x40552a
lea eax, [ebp - 0x1840]
push eax
push edi
call fcn.00407945
push eax
call fcn.0040b0df
test eax, eax
jne 0x40552a
mov esi, 0x400
push esi
push edi
lea eax, [ebp - 0x400]
push eax
call fcn.0040b1f1
push ebx
push str.rtmp_d
lea eax, [ebp - 0x400]
push eax
call fcn.00407945
push eax
call fcn.0040a96b
add esp, 0xc
push 0
lea eax, [ebp - 0x400]
push eax
call fcn.0040605b
test al, al
je 0x405469
add ebx, 0x7b
cmp ebx, 0x2710
jl 0x405423
push 0
lea eax, [ebp - 0x400]
push eax
call fcn.0040605b
test al, al
jne 0x40552a
push esi
push edi
lea eax, [ebp - 0x800]
push eax
call fcn.0040b1f1
lea eax, [ebp - 0x24c0]
push eax
call fcn.00407945
push eax
lea eax, [ebp - 0x800]
push eax
call fcn.00407945
push eax
call fcn.0040a81a
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileA]
lea eax, [ebp - 0x400]
push eax
lea eax, [ebp - 0x800]
push eax
call esi
test eax, eax
je 0x40552a
lea ecx, [ebp - 0x1420]
call fcn.00405766
push 0
push edi
xor bl, bl
call fcn.0040605b
test al, al
jne 0x4054f1
push 1
push 0
push edi
lea ecx, [ebp - 0x1420]
call fcn.00405a85
mov bl, al
lea eax, [ebp - 0x800]
push eax
lea eax, [ebp - 0x400]
push eax
call esi
test bl, bl
je 0x40551b
lea ecx, [ebp - 0x1420]
call fcn.004057d1
lea ecx, [ebp - 0x1420]
call fcn.0040584f
lea ecx, [ebp - 0x1420]
call fcn.00405921
mov al, 1
jmp 0x40552c
xor al, al
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405944
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esi + 0xc18], ebx
cmp byte [esi + 0x16], bl
je 0x40595e
mov byte [ebp + 0x10], 1
mov dword [ebp - 4], 0x80000000
cmp byte [ebp + 0x14], bl
je 0x405971
mov dword [ebp - 4], 0xc0000000
mov dword [ebp + 0x14], 1
cmp byte [ebp + 0x10], bl
je 0x405984
mov dword [ebp + 0x14], 3
xor eax, eax
cmp byte [esi + 0x15], bl
setne al
dec eax
and eax, 0x8000000
mov edi, eax
call fcn.004068f3
test eax, eax
je 0x4059bd
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4059bd
cmp word [eax], bx
je 0x4059bd
push ebx
push edi
push 3
push ebx
push dword [ebp + 0x14]
push dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4059d1
push ebx
push edi
push 3
push ebx
push dword [ebp + 0x14]
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4059ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4059ed
mov dword [esi + 0xc18], 1
cmp edi, 0xffffffff
setne byte [ebp + 0x13]
mov byte [esi + 0x12], bl
mov dword [esi + 0xc], ebx
mov byte [esi + 0x10], bl
cmp byte [ebp + 0x13], bl
je 0x405a4f
mov dword [esi + 4], edi
cmp dword [ebp + 0xc], ebx
je 0x405a1b
push dword [ebp + 0xc]
lea eax, [esi + 0x418]
push eax
call fcn.0040b9e7
jmp 0x405a24
xor eax, eax
mov word [esi + 0x418], ax
lea eax, [esi + 0x17]
cmp dword [ebp + 8], ebx
je 0x405a37
push dword [ebp + 8]
push eax
call fcn.0040a81a
jmp 0x405a45
push 0x1000000
push eax
push dword [ebp + 0xc]
call fcn.0040b7c4
push dword [esi + 4]
mov ecx, esi
call fcn.004057aa
mov al, byte [ebp + 0x13]
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x405b7f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0xc], 1
mov esi, 0x4e20
jne 0x405ba5
cmp dword [ebp + 0xc], esi
jbe 0x405b9a
mov dword [ebp + 0xc], esi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [edi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405bf5
mov ecx, edi
call fcn.004058fe
test al, al
je 0x405bdb
cmp dword [ebp + 0xc], esi
jbe 0x405bdb
push esi
push dword [ebp + 8]
mov ecx, edi
call fcn.00405b7f
jmp 0x405bf8
cmp dword [edi + 0xc], 1
jne 0x405bf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x405bf0
xor eax, eax
jmp 0x405bf8
or eax, 0xffffffff
jmp 0x405bf8
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 8
Function at 0x405e32
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0
push esi
mov esi, ecx
je 0x405f32
mov eax, dword [esi + 0xc]
test eax, eax
je 0x405e5f
dec eax
je 0x405e54
dec eax
jne 0x405e5f
push 0xfffffffffffffff4
jmp 0x405e56
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
xor edi, edi
mov dword [ebp - 4], edi
cmp dword [esi + 0xc], edi
je 0x405eae
cmp dword [ebp + 0xc], edi
jbe 0x405ec9
mov ecx, dword [ebp + 0xc]
sub ecx, edi
mov eax, 0x4000
cmp ecx, eax
jae 0x405e86
mov eax, ecx
push 0
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp + 8]
add eax, edi
push eax
push dword [esi + 4]
call ebx
dec eax
neg eax
sbb al, al
inc al
je 0x405ec9
add edi, 0x4000
cmp edi, dword [ebp + 0xc]
jb 0x405e76
jmp 0x405ec5
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call ebx
dec eax
neg eax
sbb al, al
inc al
test al, al
jne 0x405f2c
cmp byte [esi + 0x14], 0
je 0x405f2c
cmp dword [esi + 0xc], 0
jne 0x405f2c
push 0
lea eax, [esi + 0x17]
mov edi, 0x414474
push eax
mov ecx, edi
call fcn.00403950
test al, al
je 0x405f1f
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jae 0x405e67
test eax, eax
jbe 0x405e67
push 0
mov ecx, esi
call fcn.0040587f
mov ecx, dword [ebp - 4]
xor edi, edi
sub eax, ecx
sbb edx, edi
push edx
push eax
mov ecx, esi
call fcn.00405d9a
jmp 0x405e67
lea eax, [esi + 0x17]
push eax
push 0
mov ecx, edi
call fcn.00403ad8
pop edi
mov byte [esi + 8], 1
pop ebx
pop esi
leave
ret 8

Function at 0x406014
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
lea eax, [ebp - 0x400]
push eax
push dword [ebp + 8]
call fcn.0040786a
movsx eax, byte [ebp - 0x400]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x400]
and eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
je 0x406054
cmp eax, 5
je 0x406054
xor eax, eax
jmp 0x406057
xor eax, eax
inc eax
leave
ret 4

Function at 0x40605b
Capabilities:
Get file attributes

Disassembly:
call fcn.004068f3
test eax, eax
je 0x40607b
mov eax, dword [esp + 8]
test eax, eax
je 0x40607b
cmp word [eax], 0
je 0x40607b
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x406085
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov al, cl
ret 8

Function at 0x4060af
Capabilities:
Get file attributes

Disassembly:
call fcn.004068f3
test eax, eax
je 0x4060cf
mov eax, dword [esp + 8]
test eax, eax
je 0x4060cf
cmp word [eax], 0
je 0x4060cf
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x4060d9
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
ret 8
Function at 0x4060dc
Capabilities:
Set file attributes

Disassembly:
call fcn.004068f3
test eax, eax
je 0x406100
mov eax, dword [esp + 8]
test eax, eax
je 0x406100
cmp word [eax], 0
je 0x406100
push dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x40610e
push dword [esp + 0xc]
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
setne al
ret 0xc

Function at 0x406148
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push esi
call fcn.004068f3
mov esi, dword [ebp + 0xc]
test eax, eax
je 0x40616d
test esi, esi
je 0x40616d
cmp word [esi], 0
je 0x40616d
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x406178
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x406192
cmp byte [ebp + 0x10], 0
je 0x40618e
push dword [ebp + 0x14]
push esi
push dword [ebp + 8]
call fcn.004060dc
xor eax, eax
jmp 0x4061aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4061a7
cmp eax, 3
je 0x4061a7
xor eax, eax
inc eax
jmp 0x4061aa
push 2
pop eax
pop esi
pop ebp
ret 0x10
Function at 0x407f9a
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4ee0
call fcn.00401200
push 1
mov ecx, 0x414474
call fcn.004038d1
call fcn.0040b089
push 0x400
lea eax, [ebp - 0x400]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x8005
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
lea eax, [ebp - 0x400]
push eax
mov ecx, 0x414480
call fcn.00409b81
lea ecx, [ebp - 0x4ee0]
call fcn.00402cd7
push 0x40f3a0
lea eax, [ebp - 0x1c45]
push eax
call fcn.0040a81a
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
test eax, eax
je 0x408086
cmp byte [eax], 0x22
jne 0x40801c
push 0x22
inc eax
push eax
call fcn.0040a750
test eax, eax
je 0x408086
push esi
push 0x40f39c
push eax
call fcn.0040a7b9
mov esi, eax
test esi, esi
je 0x408085
jmp 0x408035
inc esi
movsx eax, byte [esi]
push eax
call fcn.0040b186
test al, al
jne 0x408034
movsx eax, byte [esi]
push eax
lea ecx, [ebp - 0x4ee0]
call fcn.004029c1
test al, al
je 0x408085
movzx eax, byte [esi + 1]
push eax
call fcn.0040b15b
movzx eax, al
mov ecx, eax
sub ecx, 0x3f
je 0x40807a
sub ecx, 0x15
je 0x408072
dec ecx
dec ecx
jne 0x408085
mov byte [ebp - 0x1c45], al
jmp 0x408085
lea ecx, [ebp - 0x4ee0]
call fcn.00402894
pop esi
push 0
lea eax, [ebp - 0x400]
push eax
lea ecx, [ebp - 0x4ee0]
call fcn.00402996
lea ecx, [ebp - 0x4ee0]
call fcn.00402aa0
push dword [ebp - 0x2640]
push dword [ebp - 0x2644]
call fcn.00402d1b
lea eax, [ebp - 0x2a47]
push eax
call fcn.00402d0a
cmp byte [ebp - 0x25f8], 0
jne 0x4080d8
cmp dword [ebp - 0x2644], 3
je 0x4080d8
xor al, al
jmp 0x4080da
mov al, 1
mov byte [0x41447d], al
mov al, byte [ebp - 0x205e]
lea ecx, [ebp - 0x4ee0]
mov byte [0x41447e], al
call fcn.0040283a
lea ecx, [ebp - 0x4ee0]
call fcn.00402916
lea ecx, [ebp - 0x4ee0]
call fcn.00402c07
call fcn.00405d1f
mov eax, dword [0x414474]
leave
ret