joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46bba8
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffda0
push ebx
xor edx, edx
mov dword [ebp - 0x260], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x46bd53
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x34], 0
jne 0x46bd34
mov dl, 1
mov eax, dword [0x417650]
call fcn.004039d8
mov edx, dword [ebp - 4]
mov dword [edx + 0x34], eax
mov eax, dword [ebp - 4]
add eax, 0x38
call fcn.00404758
lea eax, [ebp - 0x114]
push eax
push 0x40
call sub.user32.dll_GetKeyboardLayoutList
dec eax
test eax, eax
jl 0x46bd23
inc eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x114]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00459630
test al, al
je 0x46bd16
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x25c], eax
mov byte [ebp - 0x258], 0
lea ecx, [ebp - 0x25c]
mov edx, 0x46bd64
lea eax, [ebp - 0x254]
call fcn.00409ca4
push eax
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x46bd16
xor eax, eax
push ebp
push 0x46bd0f
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], pe_nt_image_headers32
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0
push 0x46bd9c
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
jne 0x46bcf8
lea eax, [ebp - 0x260]
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.004049c8
mov edx, dword [ebp - 0x260]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ebx, dword [eax]
call dword [ebx + 0x3c]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x3c]
jne 0x46bcf8
mov eax, dword [ebp - 4]
add eax, 0x38
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.004049c8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46bd16
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
add dword [ebp - 0x14], 4
dec dword [ebp - 0x10]
jne 0x46bc19
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov byte [eax + 0x1d], 0
mov dl, 1
call fcn.0041bb00
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x34]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46bd5a
lea eax, [ebp - 0x260]
call fcn.00404758
ret

Function at 0x46c688
Capabilities:
Create thread
Set global application hook

Disassembly:
push ecx
mov eax, dword [0x52abe8]
cmp byte [eax + 0xa5], 0
jne 0x46c6f9
cmp dword [0x52ac00], 0
jne 0x46c6ba
call sub.kernel32.dll_GetCurrentThreadId_1
push eax
push 0
mov eax, 0x46c644
push eax
push 3
call sub.user32.dll_SetWindowsHookExA
mov dword [0x52ac00], eax
cmp dword [0x52abfc], 0
jne 0x46c6d5
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [0x52abfc], eax
cmp dword [0x52ac04], 0
jne 0x46c6f9
push esp
push 0
push 0
push 0x46c5e8
push 0x3e8
push 0
call sub.kernel32.dll_CreateThread
mov dword [0x52ac04], eax
pop edx
ret
Function at 0x46c7f0
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
push esi
test dl, dl
je 0x46c807
add esp, 0xfffffff0
call fcn.00403d2c
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.0041f9bc
mov eax, dword [0x5290a8]
cmp word [eax + 2], 0
jne 0x46c82f
mov eax, dword [0x5290a8]
mov dword [eax + 4], ebx
mov dword [eax], fcn.0046df70
mov eax, dword [0x529180]
cmp word [eax + 2], 0
jne 0x46c849
mov eax, dword [0x529180]
mov dword [eax + 4], ebx
mov dword [eax], fcn.0046e168
mov byte [ebx + 0x34], 0
mov dl, 1
mov eax, dword [0x4170a8]
call fcn.004039d8
mov dword [ebx + 0x90], eax
mov dl, 1
mov eax, dword [0x4170a8]
call fcn.004039d8
mov dword [ebx + 0xa8], eax
xor eax, eax
mov dword [ebx + 0x60], eax
xor eax, eax
mov dword [ebx + 0x84], eax
mov dword [ebx + 0x5c], 0xff000018
mov dword [ebx + 0x78], 0x1f4
mov byte [ebx + 0x7c], 1
xor eax, eax
mov dword [ebx + 0x80], eax
mov dword [ebx + 0x74], 0x9c4
mov byte [ebx + 0x88], 0
mov byte [ebx + 0x9d], 1
mov byte [ebx + 0xb4], 1
mov dl, 1
mov eax, dword [0x421ff4]
call fcn.00429eb0
mov esi, eax
mov dword [ebx + 0x98], esi
push 0x46c9d0
mov eax, dword [0x528fa0]
mov eax, dword [eax]
push eax
call sub.user32.dll_LoadIconA
mov edx, eax
mov eax, esi
call fcn.0042a280
mov eax, dword [ebx + 0x98]
mov dword [eax + 0x14], ebx
mov dword [eax + 0x10], 0x46e718
push pe_nt_image_headers32
lea eax, [ebp - 0x101]
push eax
mov eax, dword [0x528fa0]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_GetModuleFileNameA_1
lea eax, [ebp - 0x101]
push eax
lea eax, [ebp - 0x101]
push eax
call sub.user32.dll_OemToCharA
lea eax, [ebp - 0x101]
mov dl, 0x5c
call fcn.0040da04
test eax, eax
je 0x46c93e
lea edx, [eax + 1]
lea eax, [ebp - 0x101]
call fcn.00409684
lea eax, [ebp - 0x101]
mov dl, 0x2e
call fcn.0040da2c
test eax, eax
je 0x46c952
mov byte [eax], 0
lea eax, [ebp - 0x101]
inc eax
push eax
call sub.user32.dll_CharLowerA
lea eax, [ebx + 0x8c]
lea edx, [ebp - 0x101]
mov ecx, pe_nt_image_headers32
call fcn.004049c8
mov eax, dword [0x528e34]
cmp byte [eax], 0
jne 0x46c986
mov eax, ebx
call fcn.0046caf8
mov byte [ebx + 0x59], 1
mov byte [ebx + 0x5a], 1
mov byte [ebx + 0x5b], 1
mov byte [ebx + 0x9e], 1
xor eax, eax
mov dword [ebx + 0xa0], eax
mov eax, ebx
call fcn.0046e8f4
mov eax, ebx
call fcn.0046f2b8
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x46c9c6
call fcn.00403d84
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x46cd78
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [0x52abe8]
cmp dword [eax + 0x30], 0
je 0x46ce22
cmp dword [ebx + 0x94], 0
jne 0x46ce1c
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x46cd08
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0x90]
cmp dword [eax + 8], 0
je 0x46ce1c
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongA
test al, 8
je 0x46cde2
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0x90]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x46ce1c
push 0x213
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov edx, esi
mov eax, dword [ebx + 0x90]
call fcn.0041959c
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x46cdf1
inc dword [ebx + 0x94]
pop ecx
pop edx
pop esi
pop ebx
ret

Function at 0x46d984
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xffffff00
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0xa4], 0
je 0x46d9b9
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x30]
push eax
call sub.user32.dll_GetWindowTextA
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.00404848
jmp 0x46d9c6
mov eax, esi
mov edx, dword [ebx + 0x8c]
call fcn.004047ac
add esp, 0x100
pop esi
pop ebx
ret

Function at 0x46ead0
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, dword [ebx + 0x84]
test esi, esi
je 0x46eb11
mov eax, esi
call fcn.00454bd4
test al, al
je 0x46eb11
mov eax, dword [ebx + 0x84]
call fcn.004548d0
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x46eb11
push 0
mov eax, dword [ebx + 0x84]
call fcn.004548d0
push eax
call sub.user32.dll_ShowWindow
pop esi
pop ebx
ret
Function at 0x473adc
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff84
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov byte [ebp - 9], cl
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.00404c08
mov eax, dword [ebp - 8]
call fcn.00404c08
xor eax, eax
push ebp
push 0x473c98
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x64]
mov eax, dword [ebp - 4]
call fcn.00408b18
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 4]
call fcn.004047f0
lea edx, [ebp - 0x68]
mov eax, dword [ebp - 8]
call fcn.00408b18
mov eax, dword [ebp - 0x68]
call fcn.00404c18
mov ebx, eax
lea eax, [ebp - 0x6c]
mov edx, ebx
call fcn.00404950
mov eax, dword [ebp - 0x6c]
call fcn.00404a18
test eax, eax
jne 0x473b69
xor ebx, ebx
cmp byte [ebp - 9], 0
jne 0x473b90
movzx eax, si
push eax
push 0
push ebx
mov eax, dword [ebp - 4]
call fcn.00404c18
push eax
push 0x473ca8
push 0
call sub.shell32.dll_ShellExecuteA
jmp 0x473c70
push dword [ebp - 4]
push 0x473cb8
push dword [ebp - 8]
lea eax, [ebp - 0x74]
mov edx, 3
call fcn.00404ad8
mov eax, dword [ebp - 0x74]
lea edx, [ebp - 0x70]
call fcn.00408b18
mov eax, dword [ebp - 0x70]
call fcn.00404c18
mov edi, eax
lea edx, [ebp - 0x78]
mov eax, dword [ebp - 4]
call fcn.00409450
mov eax, dword [ebp - 0x78]
call fcn.00404c18
mov ebx, eax
lea eax, [ebp - 0x7c]
mov edx, ebx
call fcn.00404950
mov eax, dword [ebp - 0x7c]
call fcn.00404a18
test eax, eax
jne 0x473bea
xor ebx, ebx
lea eax, [ebp - 0x50]
xor ecx, ecx
mov edx, 0x44
call fcn.004031f8
mov dword [ebp - 0x50], 0x44
mov dword [ebp - 0x24], 1
mov word [ebp - 0x20], si
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x50]
push eax
push ebx
push 0
push 0x30
push 0
push 0
push 0
push edi
push 0
call sub.kernel32.dll_CreateProcessA
cmp eax, 1
sbb eax, eax
inc eax
xor edx, edx
push ebp
push 0x473c69
push dword fs:[edx]
mov dword fs:[edx], esp
test al, al
je 0x473c49
push 0xffffffffffffffff
mov eax, dword [ebp - 0x60]
push eax
call sub.kernel32.dll_WaitForSingleObject
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x473c70
mov eax, dword [ebp - 0x60]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_CloseHandle_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x473c9f
lea eax, [ebp - 0x7c]
mov edx, 7
call fcn.0040477c
lea eax, [ebp - 8]
mov edx, 2
call fcn.0040477c
ret
Function at 0x489628
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
call fcn.00404c08
xor eax, eax
push ebp
push 0x489717
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
call fcn.00404758
cmp dword [ebp - 4], 0
je 0x4896fc
mov eax, dword [ebp - 4]
cmp byte [eax], 0x1c
je 0x48968c
lea eax, [ebp - 8]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00404c78
mov eax, dword [ebp - 8]
mov edx, 0x48972c
call fcn.00404b64
jne 0x4896ed
xor ebx, ebx
mov eax, dword [ebp - 4]
call fcn.00404a18
test eax, eax
jle 0x4896ad
mov edx, 1
mov ecx, dword [ebp - 4]
movzx ecx, byte [ecx + edx - 1]
xor ebx, ecx
inc edx
dec eax
jne 0x48969f
lea eax, [ebp - 0xc]
mov edx, ebx
call fcn.00404940
mov ecx, dword [ebp - 0xc]
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.00404a64
mov eax, dword [ebp - 4]
cmp byte [eax], 0x1c
jne 0x4896fc
mov eax, dword [esi]
call fcn.00404a18
mov edx, dword [esi]
mov al, byte [edx + eax - 1]
add al, 0xe5
sub al, 3
jae 0x4896fc
mov eax, esi
mov edx, 0x489738
call fcn.00404a20
jmp 0x4896fc
mov eax, esi
mov ecx, 0x489744
mov edx, dword [ebp - 4]
call fcn.00404a64
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x48971e
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.0040477c
ret
Function at 0x4ff6d0
Capabilities:
Check for software breakpoints

Disassembly:
push ebx
mov ebx, eax
cmp dword [ebx + 0x14], 0xca
jne 0x4ff6fe
mov eax, ebx
call fcn.00500184
cmp dword [ebx + 0x40], 0
je 0x4ff6f7
mov dword [ebx + 0x14], 0xcf
mov eax, 1
pop ebx
ret
mov dword [ebx + 0x14], 0xcb
cmp dword [ebx + 0x14], 0xcb
jne 0x4ff76f
mov edx, dword [ebx + 0x1b4]
cmp dword [edx + 0x10], 0
je 0x4ff761
cmp dword [ebx + 8], 0
je 0x4ff720
mov eax, ebx
mov edx, dword [eax + 8]
call dword [edx]
mov eax, ebx
mov edx, dword [eax + 0x1b4]
call dword [edx]
test eax, eax
jne 0x4ff732
xor eax, eax
pop ebx
ret
cmp eax, 2
je 0x4ff761
cmp dword [ebx + 8], 0
je 0x4ff713
cmp eax, 3
je 0x4ff745
dec eax
jne 0x4ff713
mov edx, dword [ebx + 8]
inc dword [edx + 4]
mov ecx, dword [edx + 4]
mov eax, dword [ebx + 8]
cmp ecx, dword [eax + 8]
jl 0x4ff713
mov edx, dword [ebx + 0x140]
add dword [eax + 8], edx
jmp 0x4ff713
mov ecx, dword [ebx + 0x90]
mov dword [ebx + 0x98], ecx
jmp 0x4ff78d
cmp dword [ebx + 0x14], 0xcc
je 0x4ff78d
mov eax, dword [ebx]
mov dword [eax + 0x14], 0x14
mov edx, dword [ebx + 0x14]
mov dword [eax + 0x18], edx
mov eax, ebx
mov edx, dword [eax]
call dword [edx]
mov eax, ebx
call fcn.004ff798
pop ebx
ret

Function at 0x510104
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
lea eax, [ebp - 0x10]
mov edx, dword [0x416630]
call fcn.00405118
xor eax, eax
push ebp
push 0x510248
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x528cec], 0
jne 0x510157
mov ecx, dword [0x528e44]
mov dl, 1
mov eax, dword [0x407bd8]
call fcn.0040cc30
call fcn.00404194
lea eax, [ebp - 0x20]
xor ecx, ecx
mov edx, 0x10
call fcn.004031f8
mov eax, ebx
call fcn.00404fe8
mov dword [ebp - 0x1c], eax
push esi
push edi
mov esi, 0x510258
lea edi, [ebp - 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
lea eax, [ebp - 0x30]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
call fcn.004061b0
xor eax, eax
mov dword [ebp - 8], eax
mov eax, ebx
call fcn.00404ff8
test eax, eax
jle 0x5101ef
mov dword [ebp - 4], 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x40]
push eax
call sub.kernel32.dll_GetComputerNameA
test eax, eax
je 0x5101e8
lea eax, [ebp - 0x44]
mov edx, ebx
call fcn.004049e0
mov eax, dword [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x40]
mov ecx, 0x10
call fcn.004049c8
mov eax, dword [ebp - 0x48]
pop edx
call fcn.00408aa8
test eax, eax
jne 0x5101e8
mov ebx, 0x15
jmp 0x5101f4
mov ebx, 0x10
jmp 0x5101f4
mov ebx, 0x15
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 0x20]
push eax
push ebx
push 0
push esi
call dword [0x528cec]
call fcn.0051005c
mov eax, dword [ebp - 8]
call fcn.0051005c
mov eax, edi
mov edx, dword [ebp - 0xc]
call fcn.004061c8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51024f
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.0040477c
lea eax, [ebp - 0x10]
mov edx, dword [0x416630]
call fcn.004051e8
ret
Function at 0x401595
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x4015c7
test dl, 7
je 0x4015c7
movzx ecx, byte [edx]
movzx eax, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x430d40]
inc edx
mov dword [ebp + 0xc], edx
sub esi, 1
jne 0x4015a7
cmp esi, 8
jb 0x401657
push edi
mov edi, esi
shr edi, 3
xor ebx, dword [edx]
sub esi, 8
mov edx, dword [edx + 4]
mov ecx, edx
shr ecx, 0x18
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x430d40]
xor ecx, dword [eax*4 + 0x431140]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x431540]
mov eax, ebx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x431d40]
mov eax, ebx
shr eax, 0x10
movzx eax, al
xor ecx, dword [eax*4 + 0x432140]
mov eax, ebx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x432540]
movzx eax, dl
mov edx, dword [ebp + 0xc]
add edx, 8
mov dword [ebp + 0xc], edx
xor ecx, dword [eax*4 + 0x431940]
movzx eax, bl
xor ecx, dword [eax*4 + 0x432940]
mov ebx, ecx
sub edi, 1
jne 0x4015d6
pop edi
test esi, esi
je 0x401673
movzx ecx, byte [edx]
movzx eax, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x430d40]
inc edx
sub esi, 1
jne 0x40165b
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 0xc

Function at 0x401cbd
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 1
jne 0x401cd6
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401d49
mov ecx, esi
call fcn.00401daa
test al, al
je 0x401d11
mov eax, 0x4e20
cmp dword [ebp + 0xc], eax
jbe 0x401d11
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.00401cbd
jmp 0x401d4c
cmp dword [esi + 0xc], 1
jne 0x401d26
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x401d26
xor eax, eax
jmp 0x401d4c
cmp dword [esi + 0xc], 0
jne 0x401d44
mov ebx, 0x8000
cmp dword [ebp + 0xc], ebx
jbe 0x401d44
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x21
jne 0x401d44
push ebx
jmp 0x401d05
or eax, 0xffffffff
jmp 0x401d4c
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x401dd5
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x1054
call fcn.00412500
push ebx
mov ebx, dword [esp + 0x1060]
push ebp
push edi
mov edi, ecx
and dword [edi + 0x1020], 0
cmp byte [edi + 0x1d], 0
jne 0x401e01
test bl, 4
jne 0x401e01
xor cl, cl
jmp 0x401e03
mov cl, 1
mov eax, ebx
shr eax, 1
push esi
and al, 1
movzx esi, al
neg esi
sbb esi, esi
and esi, 0xc0000000
add esi, 0x80000000
test bl, 1
je 0x401e28
or esi, 0x40000000
shr ebx, 3
not ebx
and ebx, 1
test cl, cl
je 0x401e37
or ebx, 2
xor eax, eax
lea ecx, [esp + 0x1c]
cmp byte [edi + 0x15], al
setne al
dec eax
and eax, 0x8000000
mov dword [esp + 0x10], eax
call fcn.00401a74
cmp byte [edi + 0x1c], 0
je 0x401e5e
or esi, 0x100
push 0
push dword [esp + 0x14]
push 3
push 0
push ebx
push esi
push dword [esp + 0x1080]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x401ee0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
push 0x800
push eax
push dword [esp + 0x1070]
call fcn.0040333b
test al, al
je 0x401ecf
push 0
push dword [esp + 0x14]
lea eax, [esp + 0x24]
push 3
push 0
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x401eca
mov dword [esp + 0x14], eax
cmp ebp, 0xffffffff
jne 0x401ee0
cmp dword [esp + 0x14], 2
jne 0x401ee0
mov dword [edi + 0x1020], 1
cmp byte [edi + 0x1c], 0
pop esi
je 0x401f06
cmp ebp, 0xffffffff
je 0x401f06
or dword [esp + 0x10], 0xffffffff
lea eax, [esp + 0x10]
or dword [esp + 0x14], 0xffffffff
push 0
push eax
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor eax, eax
cmp ebp, 0xffffffff
mov byte [edi + 0x12], al
setne bl
mov dword [edi + 0xc], eax
mov byte [edi + 0x10], al
cmp ebp, 0xffffffff
je 0x401f34
push 0x800
push dword [esp + 0x1068]
lea ecx, [edi + 0x1e]
mov dword [edi + 4], ebp
push ecx
call fcn.0040620e
pop edi
pop ebp
mov al, bl
pop ebx
add esp, 0x1054
ret 8
Function at 0x402225
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, dword [esp + 0xc]
push edi
mov edi, ecx
test ebp, ebp
jne 0x402238
mov al, 1
jmp 0x402326
cmp dword [edi + 0xc], 1
jne 0x402249
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [edi + 4], eax
push ebx
push esi
and dword [esp + 0x18], 0
xor bl, bl
cmp dword [edi + 0xc], 0
je 0x40229e
xor esi, esi
test ebp, ebp
je 0x4022c0
mov eax, ebp
sub eax, esi
cmp eax, 0x4000
jb 0x40226e
mov eax, 0x4000
push 0
lea ecx, [esp + 0x1c]
push ecx
push eax
mov eax, dword [esp + 0x20]
add eax, esi
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
add bl, 1
je 0x4022c0
add esi, 0x4000
cmp esi, ebp
jb 0x40225e
jmp 0x4022bc
push 0
lea eax, [esp + 0x1c]
push eax
push ebp
push dword [esp + 0x20]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec eax
neg eax
sbb al, al
inc al
mov bl, al
test bl, bl
jne 0x40231e
cmp byte [edi + 0x14], 0
je 0x40231e
cmp dword [edi + 0xc], 0
jne 0x40231e
push 0
lea esi, [edi + 0x1e]
mov ecx, 0x44db44
push esi
call fcn.00401791
test al, al
je 0x402311
cmp dword [esp + 0x18], ebp
jae 0x40224b
cmp dword [esp + 0x18], 0
jbe 0x40224b
mov esi, dword [edi]
mov ecx, edi
push 0
call dword [esi + 0x14]
sub eax, dword [esp + 0x1c]
mov ecx, edi
sbb edx, 0
push edx
push eax
call dword [esi + 0x10]
jmp 0x40224b
push esi
push 0
mov ecx, 0x44db44
call fcn.004019d3
pop esi
mov al, bl
mov byte [edi + 8], 1
pop ebx
pop edi
pop ebp
ret 8

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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.00412500
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4024b5
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.0040333b
test al, al
je 0x4024b5
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4

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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.00412500
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.0040364a
movzx eax, word [eax]
cmp eax, 0x2e
je 0x402523
cmp eax, 0x20
je 0x402523
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x402556
push esi
call fcn.0040245c
test al, al
jne 0x402569
push 0x800
lea eax, [ebp - 0x1000]
push eax
push esi
call fcn.0040333b
test al, al
je 0x402569
push 0
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x402569
cmp byte [ebp + 0xc], 0
je 0x402565
push dword [ebp + 0x10]
push esi
call fcn.0040272f
xor eax, eax
jmp 0x402581
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40257e
cmp eax, 3
je 0x40257e
xor eax, eax
inc eax
jmp 0x402581
push 2
pop eax
pop esi
mov esp, ebp
pop ebp
ret 0xc