joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401028
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
nop
mov eax, dword [ebp + 8]
and eax, 0xffff
mov ecx, 0xa
push ecx
push eax
mov eax, 0
push eax
call sub.kernel32.dll_FindResourceA
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp eax, 0
jne 0x401066
mov eax, 0
jmp 0x4010b1
mov eax, dword [ebp - 4]
push eax
mov eax, 0
push eax
call sub.kernel32.dll_LoadResource
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, 0
jne 0x40108e
mov eax, 0
jmp 0x4010b1
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
push ecx
mov ecx, 0
push ecx
mov dword [ebp - 0xc], eax
call sub.kernel32.dll_SizeofResource
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_LockResource
leave
ret

Function at 0x4010b3
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
nop
lea eax, [ebp - 4]
push eax
mov eax, 1
push eax
call fcn.00401028
add esp, 8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, 0
jne 0x401100
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov ecx, str.Failed_to_load_embedded_resource._n
push ecx
push eax
call sub.msvcrt.dll_fprintf
add esp, 8
mov eax, 1
jmp 0x40116f
mov eax, 0x40
push eax
mov eax, 0x1000
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, 0
push eax
call sub.kernel32.dll_VirtualAlloc
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, 0
jne 0x40114c
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov ecx, str.VirtualAlloc_failed._n
push ecx
push eax
call sub.msvcrt.dll_fprintf
add esp, 8
mov eax, 1
jmp 0x40116f
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
call fcn.00401000
mov eax, dword [ebp - 0xc]
call eax
mov eax, 0
leave
ret
Function at 0x4070bd
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x40d468
cmp edx, dword [eax]
je 0x4070df
add eax, 8
inc ecx
cmp eax, 0x40d4f8
jl 0x4070d0
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x40d468]
jne 0x40720d
mov eax, dword [0x40e498]
cmp eax, 1
je 0x4071e7
test eax, eax
jne 0x407110
cmp dword [0x40d39c], 1
je 0x4071e7
cmp edx, 0xfc
je 0x40720d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x407147
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00404340
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00404190
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40718a
lea eax, [ebp - 0x1a4]
push eax
call fcn.00404190
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40b5ec
push edi
call fcn.00408c50
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00404340
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00404350
lea eax, [ebp - 0xa0]
push 0x40b5cc
push eax
call fcn.00404350
push dword [esi + 0x40d46c]
lea eax, [ebp - 0xa0]
push eax
call fcn.00404350
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00408bc2
add esp, 0x2c
pop edi
jmp 0x40720d
lea eax, [ebp + 8]
lea esi, [esi + 0x40d46c]
push 0
push eax
push dword [esi]
call fcn.00404190
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 0x503b8c
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
mov ecx, ebp
push ebp
mov ebp, esp
mov dword [0x505076], ecx
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x505298], eax
mov dword [0x505220], 0x503376
mov dword [0x50521c], 2
jmp 0x503bbc
mov dword [0x505224], 0
mov dword [0x505228], 0
mov dword [0x505218], 0x30
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov dword [0x50522c], eax
mov dword [0x505240], 0x50408c
mov dword [0x505238], 0xf
mov dword [0x50506e], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadIconA]
mov dword [0x505230], eax
mov dword [0x505244], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
mov dword [0x505234], eax
push 0x505218
call dword [sym.imp.user32.dll_RegisterClassExA]
push 0
push dword [0x50506e]
push 0
push 0
push 0x1e5
push 0x21e
push 0xffffe52a
push 0xfffff588
push 0x40000
push str.wait
push str.aroka
push 0
call dword [sym.imp.user32.dll_CreateWindowExA]
mov dword [0x505290], eax
push 5
push dword [0x505290]
call dword [sym.imp.user32.dll_ShowWindow]
push dword [0x505290]
call dword [sym.imp.user32.dll_UpdateWindow]
jmp 0x503c8f
push 0
push 0
push 0
push 0x505248
call dword [sym.imp.user32.dll_GetMessageA]
or eax, eax
je 0x503cbc
push 0x505248
call dword [sym.imp.user32.dll_TranslateMessage]
push 0x505248
call dword [sym.imp.user32.dll_DispatchMessageA]
jmp 0x503c8f
mov eax, dword [0x505250]
jmp 0x503cc9
call 0x502c0d
ret
Function at 0x1000cc10
Capabilities:
Parse pe header

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

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

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

Function at 0xe554b8
Capabilities:
Encode data using xor

Disassembly:
jmp 0xe554c2
pushal
call 0xe554c8
pop ebp
sub ebp, 0x10
sub ebp, 0xa554b8
jmp 0xe554de
mov eax, 0xa554b8
add eax, ebp
add eax, 0x4c
mov ecx, 0x5ad
mov edx, 0x7712db1c
xor byte [eax], dl
inc eax
dec ecx
jne 0xe554f5
jmp 0xe55508
xchg edi, eax
rcl dword [edi + 0x1c1c2095]
sbb al, 0x9d
fucom st(4)
sbb al, 0x1c
sbb al, 0x1f
shl dword [edx + ebx - 0x59e3e3e4], 1
xor al, 0x1c
sbb al, 0x1c
jmp 0xe55522
Function at 0x41b2f0
Capabilities:
Create directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x473548
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x475280]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x14]
call fcn.004166f0
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 8], 0
jne 0x41b353
mov dword [ebp - 0x10], 0x80070057
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0041c370
jmp 0x41b3eb
push 0
lea ecx, [ebp - 0x14]
call fcn.004129e0
push eax
push 1
push 0x404178
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
jne 0x41b389
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041c350
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
push edx
call fcn.0041c370
jmp 0x41b3eb
mov dword [ebp - 0x24], 0xc
lea ecx, [ebp - 0x14]
call fcn.0041b460
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp + 8]
call fcn.0042181d
test eax, eax
jne 0x41b3eb
mov eax, dword [ebp + 8]
push eax
push 0x404248
push 0
call fcn.0041bc10
add esp, 0xc
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x41b3eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041c350
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
call fcn.0041c370
cmp dword [ebp - 0x10], 0
jge 0x41b408
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0x404278
push 0
call fcn.0041bc10
add esp, 0x10
mov eax, dword [ebp - 0x10]
push eax
call fcn.0041c3a0
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.0041b440
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 4
Function at 0x41e000
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x473698
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x475280]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x1c]
call fcn.004166f0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.004166f0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.004166f0
mov byte [ebp - 4], 2
mov dword [ebp - 0x10], 0
cmp dword [ebp + 8], 0x80000001
jne 0x41e09f
lea ecx, [ebp - 0x18]
call fcn.004129e0
push eax
push 0x20006
call fcn.0041fa20
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jge 0x41e088
mov eax, dword [ebp - 0x10]
push eax
call fcn.0041c370
jmp 0x41e167
lea ecx, [ebp - 0x18]
call fcn.0041b460
test eax, eax
je 0x41e09f
lea ecx, [ebp - 0x18]
call fcn.0041b460
mov dword [ebp + 8], eax
lea ecx, [ebp - 0x1c]
call fcn.004129e0
push eax
push 2
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0041f850
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jge 0x41e0ce
mov eax, dword [ebp - 0x10]
push eax
call fcn.0041c370
jmp 0x41e167
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x14]
call fcn.004129e0
push eax
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
call fcn.0041fb50
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jge 0x41e0fc
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0041c370
jmp 0x41e167
push 0
lea edx, [ebp - 0x14]
push edx
call fcn.0041f610
movzx eax, al
test eax, eax
je 0x41e11c
lea ecx, [ebp + 0x14]
push ecx
call fcn.00414560
mov dword [ebp - 0x20], eax
jmp 0x41e12d
lea ecx, [ebp - 0x14]
call fcn.0041b460
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x24]
mov dword [ebp + 0x1c], edx
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 0x20]
push edx
push 0xb
push 0
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0041b460
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push eax
call fcn.0041d730
test eax, eax
jne 0x41e167
xor ecx, ecx
jne 0x41e15a
mov edx, dword [ebp - 0x10]
push edx
call fcn.0041c370
mov eax, dword [ebp - 0x10]
push eax
call fcn.0041c3a0
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x28], ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.0041c680
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.0041f520
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.0041f520
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 0x18
Function at 0x41fb90
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x41fbf6
mov ecx, dword [ebp - 8]
and ecx, 0x10
je 0x41fbd8
cmp dword [ebp + 0xc], 0
je 0x41fbc9
mov dword [ebp - 0xc], 1
jmp 0x41fbd0
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0xc]
mov dword [ebp - 4], edx
jmp 0x41fbf4
cmp dword [ebp + 0xc], 0
jne 0x41fbe7
mov dword [ebp - 0x10], 1
jmp 0x41fbee
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
jmp 0x41fbfd
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 4]
mov dword [ecx], edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0041c3a0
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret 0xc

Function at 0x420aeb
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
push ebx
push esi
xor esi, esi
mov ebx, edx
push edi
test ecx, ecx
je 0x420b96
test ebx, ebx
je 0x420b96
xor edx, edx
call fcn.00422bac
mov edi, eax
test edi, edi
je 0x420b55
xor edx, edx
mov ecx, ebx
call fcn.00422bac
mov esi, eax
test esi, esi
je 0x420b55
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x420b3e
xor edx, edx
mov ecx, esi
call fcn.0042120a
push dword [ebp + 8]
mov edx, esi
push ecx
push dword [ebp + 0x10]
mov ecx, edi
push dword [ebp + 0xc]
call fcn.00420ba7
mov ebx, eax
jmp 0x420b58
mov ebx, dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
test edi, edi
je 0x420b75
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x420b89
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
jmp 0x420ba0
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x420ba7
Capabilities:
Copy file
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, ecx
xor edi, edi
test dword [ebp + 0x14], 0xffffffe0
mov ebx, edx
mov dword [ebp - 0xc], eax
je 0x420bd3
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x420d31
mov esi, dword [ebp + 0x14]
and esi, 1
test dword [ebp + 0x14], 8
je 0x420be8
or esi, 0x1000
xor edx, edx
call fcn.00422bac
mov dword [ebp - 0x14], eax
test eax, eax
je 0x420d2f
xor edx, edx
mov ecx, ebx
call fcn.00422bac
mov dword [ebp - 0x18], eax
test eax, eax
je 0x420d06
and dword [ebp - 4], edi
and dword [ebp - 8], 0
push esi
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
mov edi, eax
test edi, edi
jne 0x420c89
test dword [ebp + 0x14], 2
je 0x420c85
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
lea edx, [ebp - 8]
inc ecx
mov dword [ebp - 0x10], eax
push edx
mov edx, eax
mov dword [ebp - 4], ecx
call fcn.00421149
test eax, eax
je 0x420c85
mov edi, dword [ebp - 8]
push edi
push dword [ebp - 0x10]
push ebx
push dword [ebp - 0xc]
push 0x4046f0
push 0x4000000
push 0x475b0c
call fcn.00420a7f
add esp, 0x1c
test edi, edi
je 0x420c11
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x420c11
test edi, edi
je 0x420d06
test dword [ebp + 0x14], 4
je 0x420d06
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edi, eax
test edi, edi
jne 0x420d06
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x420cb3
push 0x1f
pop esi
push esi
push ebx
push 0x404788
push 0x2000000
push 0x475b0c
call fcn.00420a7f
add esp, 0x14
xor edx, edx
mov ecx, ebx
call fcn.0042120a
test eax, eax
jne 0x420cff
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x420ce6
push 0x1f
pop eax
push eax
push ebx
push 0x404828
push 0x2000000
push 0x475b0c
call fcn.00420a7f
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x14]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x420d2f
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x421730
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
push esi
mov ebx, ecx
xor esi, esi
push edi
test ebx, ebx
je 0x42180e
xor eax, eax
cmp ax, word [ebx]
je 0x42180e
xor edx, edx
call fcn.00422bac
mov edi, eax
test edi, edi
je 0x4217cb
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x421792
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
push 0x404d28
push 0x3000000
push 0x475b0c
call fcn.00420a7f
add esp, 0x14
xor edx, edx
mov ecx, edi
call fcn.0042120a
mov ebx, eax
test ebx, ebx
jne 0x4217ef
test esi, esi
jne 0x4217ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x404db0
push 0x3000000
push 0x475b0c
call fcn.00420a7f
jmp 0x4217ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
push 0x404e30
push 0x3000000
push 0x475b0c
call fcn.00420a7f
mov ebx, dword [ebp - 4]
add esp, 0x14
test edi, edi
je 0x421803
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
jmp 0x421818
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x42181d
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push edi
xor edi, edi
test ecx, ecx
je 0x421889
xor eax, eax
cmp ax, word [ecx]
je 0x421889
push ebx
xor edx, edx
call fcn.00422bac
mov ebx, eax
test ebx, ebx
je 0x421884
push esi
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x421851
test al, 0x10
je 0x421851
inc edi
jmp 0x42186c
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x421864
mov esi, 0x10b
cmp esi, 2
jne 0x42186c
push 3
pop esi
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop ebx
mov eax, edi
pop edi
ret
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
ret

Function at 0x421895
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebx
xor ebx, ebx
test ecx, ecx
je 0x421900
xor eax, eax
cmp ax, word [ecx]
je 0x421900
push esi
push edi
xor edx, edx
call fcn.00422bac
mov edi, eax
test edi, edi
je 0x4218eb
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4218d1
and esi, 0x10
sete bl
neg esi
sbb esi, esi
and esi, 2
jmp 0x4218d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4218f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
mov eax, ebx
pop ebx
ret
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
ret
Function at 0x4219c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov dword [ebp - 4], edx
xor ebx, ebx
push edi
xor edx, edx
call fcn.00422bac
mov edi, eax
test edi, edi
je 0x421a2a
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov dword [ebp - 8], ecx
cmp esi, 0xffffffff
je 0x421a02
test esi, 0x400
je 0x421a02
xor eax, eax
inc eax
jmp 0x421a04
xor eax, eax
mov edx, dword [ebp - 4]
xor ebx, ebx
test ecx, ecx
push edi
push 0
mov dword [edx], eax
sete bl
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop edi
mov eax, ebx
pop ebx
leave
ret
Function at 0x42229f
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x475280]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
xor ecx, ecx
mov dword [ebp - 0x21c], ebx
push ecx
pop eax
test bl, 0x10
mov dword [ebp - 0x228], ecx
mov dword [ebp - 0x224], ecx
mov edx, 0x422000
setne al
mov dword [ebp - 0x214], ecx
inc eax
mov dword [ebp - 0x218], ecx
push eax
mov dword [ebp - 0x220], eax
mov ecx, edi
lea eax, [ebp - 0x228]
push eax
push 0x422210
call fcn.00421b5f
mov esi, eax
test bl, 8
jne 0x422331
mov edx, ebx
mov ecx, edi
call fcn.00421fd1
test eax, eax
jne 0x422331
inc dword [ebp - 0x224]
cmp dword [ebp - 0x228], eax
jne 0x422331
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x224], 0
jbe 0x4223d9
push 0x208
lea eax, [ebp - 0x210]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x422373
mov word [ebp - 0x210], ax
jmp 0x422384
xor eax, eax
cmp ax, word [ebp - 0x210]
lea eax, [ebp - 0x210]
jne 0x422389
mov eax, 0x4052b8
cmp dword [ebp - 0x224], 1
mov ecx, 0x4052d4
jne 0x42239c
mov ecx, 0x40239c
push eax
push dword [ebp - 0x228]
push edi
push ecx
push dword [ebp - 0x224]
push 0x4052d8
push 0x4000000
push 0x475b0c
call fcn.00420a7f
add esp, 0x20
cmp dword [ebp - 0x228], 0
je 0x4223d7
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00471d10
leave
ret 8
Function at 0x422dad
Capabilities:
Create directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
mov esi, ecx
xor eax, eax
push edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], eax
cmp ax, word [esi]
jne 0x422ddb
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x422f31
push ebx
lea edx, [ebp - 4]
call fcn.00422bac
mov ebx, eax
test ebx, ebx
je 0x422f1e
xor eax, eax
lea edx, [ebp - 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push ecx
push eax
mov ecx, ebx
call fcn.004231ce
test eax, eax
js 0x422ee0
cmp dword [ebp - 8], 1
push 0x5c
pop ecx
jne 0x422e80
mov edx, dword [ebp - 0xc]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x14]
jne 0x422e1e
mov eax, dword [ebp - 4]
sub ecx, esi
sar ecx, 1
lea esi, [eax + ecx*2]
test edx, edx
je 0x422e49
push edx
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0x5c
pop ecx
xor edi, edi
push ecx
push esi
call sub.msvcrt.dll_wcschr
pop ecx
mov esi, eax
pop ecx
mov ecx, ebx
test esi, esi
je 0x422eae
xor eax, eax
mov word [esi], ax
call fcn.0042181d
test eax, eax
jne 0x422e75
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x5c
pop ecx
mov word [esi], cx
add esi, 2
jmp 0x422e4e
mov esi, dword [ebp - 4]
movzx eax, word [esi]
cmp eax, 0x61
jb 0x422e90
cmp eax, 0x7a
jbe 0x422e9a
cmp eax, 0x41
jb 0x422e4c
cmp eax, 0x5a
ja 0x422e4c
push 0x3a
pop eax
cmp ax, word [esi + 2]
jne 0x422e4c
cmp cx, word [esi + 4]
jne 0x422e4c
add esi, 8
jmp 0x422e4c
call fcn.0042181d
xor esi, esi
inc esi
cmp eax, esi
je 0x422edb
xor eax, eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, esi
je 0x422edb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp - 0x1c]
push 0x405918
jmp 0x422ef9
mov dword [ebp - 0x10], esi
jmp 0x422f0b
movzx eax, ax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push 0x405978
push 0x3000000
push 0x475b0c
call fcn.00420a7f
add esp, 0x14
push ebx
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x422f26
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x10]
pop ebx
pop edi
pop esi
leave
ret