joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41df80
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x288
xor eax, eax
push ebp
push esi
mov ebp, ecx
nop dword [eax]
mov esi, dword [eax*8 + 0x5219a8]
test esi, esi
je 0x41dfa5
cmp esi, ebp
je 0x41dfd1
inc eax
cmp eax, 0xa
jl 0x41df90
cmp eax, 0xa
mov ecx, 9
cmovl ecx, eax
mov dword [esp + 0xc], ecx
test edx, edx
je 0x41dff6
pop esi
mov dword [ecx*8 + 0x5219a8], ebp
mov eax, edx
mov dword [ecx*8 + 0x5219ac], edx
pop ebp
add esp, 0x288
ret
test edx, edx
je 0x41dfe6
cmp dword [eax*8 + 0x5219ac], 0
jne 0x41dfe6
mov dword [eax*8 + 0x5219ac], edx
mov eax, dword [eax*8 + 0x5219ac]
pop esi
pop ebp
add esp, 0x288
ret
push ebx
xor ebx, ebx
push ebx
push ebp
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov dword [esp + 0xc], eax
test eax, eax
je 0x41e0c6
push edi
mov ecx, 0x19
lea edi, [esp + 0x18]
mov esi, str.SYSTEMCurrentControlSetControlKeyboard_Layouts_
lea eax, [esp + 0x7c]
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
test eax, eax
je 0x41e060
push ebx
push ecx
lea eax, [esp + 0x98]
push eax
push str.Layout_File
lea edx, [esp + 0x28]
call fcn.004b0c60
add esp, 0x10
test eax, eax
je 0x41e060
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
jmp 0x41e062
xor esi, esi
mov eax, dword [esp + 0x10]
cmp ebp, eax
je 0x41e073
push 0
push eax
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
test esi, esi
je 0x41e0c5
push str.KbdLayerDescriptor
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41e0be
call eax
mov edi, dword [0x521978]
mov ebx, eax
test edi, edi
je 0x41e0b3
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
test eax, eax
je 0x41e0b3
cmp dword [esp + 0x10], 0
je 0x41e0b3
mov ebx, dword [ebx + 0x50]
jmp 0x41e0b6
mov ebx, dword [ebx + 0x28]
not ebx
and ebx, 1
add ebx, 3
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
mov eax, dword [esp + 0x10]
mov dword [eax*8 + 0x5219ac], ebx
mov dword [eax*8 + 0x5219a8], ebp
mov eax, ebx
pop ebx
pop esi
pop ebp
add esp, 0x288
ret
Function at 0x41e0f0
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x118
push ebx
push ebp
push esi
push edi
mov ebp, edx
mov bl, cl
xor edi, edi
cmp byte [edi*8 + 0x51ba0c], bl
je 0x41e26f
inc edi
cmp edi, 0x6d
jl 0x41e100
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
lea ecx, [ebx - 0x41]
mov esi, eax
cmp cl, 0x19
ja 0x41e1ff
push 0x100
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.004cc590
add esp, 0xc
xor eax, eax
mov dword [esp + 0x14], eax
push esi
push eax
push 2
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x38]
push eax
push 0
push 0x6e
call dword [sym.imp.USER32.dll_ToUnicodeEx]
cmp eax, 2
jne 0x41e169
movzx eax, word [esp + 0x18]
mov dword [esp + 0x14], eax
push esi
push 0
push 2
lea eax, [esp + 0x24]
movzx edi, bl
push eax
lea eax, [esp + 0x38]
push eax
push 0
push edi
call dword [sym.imp.USER32.dll_ToUnicodeEx]
mov dword [esp + 0x24], eax
test eax, eax
jns 0x41e1a5
push esi
push 0
push 2
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x38]
push eax
push 0
push 0x6e
call dword [sym.imp.USER32.dll_ToUnicodeEx]
mov eax, dword [esp + 0x14]
test ax, ax
je 0x41e1ed
push 1
push esi
lea edx, [esp + 0x1b]
mov ecx, eax
call fcn.0041e4a0
mov bh, al
add esp, 8
test bh, bh
je 0x41e1ed
mov dl, byte [esp + 0x13]
lea ecx, [esp + 0x28]
call fcn.0041dba0
push esi
push 0
push 2
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x38]
push eax
push 0
movzx eax, bh
push eax
call dword [sym.imp.USER32.dll_ToUnicodeEx]
cmp dword [esp + 0x24], 0
je 0x41e1fb
movzx eax, word [esp + 0x18]
jmp 0x41e20f
xor eax, eax
jmp 0x41e20f
push esi
push 2
movzx edi, bl
push edi
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
movzx eax, ax
mov word [ebp], ax
test ax, ax
je 0x41e22b
pop edi
xor eax, eax
mov word [ebp + 2], ax
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
cmp byte [esp + 0x130], 0
je 0x41e25c
test bl, bl
je 0x41e25c
push edi
push str.vk_02X
push dword [esp + 0x134]
push ebp
call fcn.004af740
add esp, 0x10
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
pop edi
xor eax, eax
mov word [ebp], ax
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
mov esi, dword [esp + 0x12c]
dec esi
push esi
push dword [edi*8 + 0x51ba08]
push ebp
call fcn.004d95fc
add esp, 0xc
xor eax, eax
mov word [ebp + esi*2], ax
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
Function at 0x41e390
Capabilities:
Log keystrokes

Disassembly:
push ecx
push esi
push edi
mov edi, ecx
movzx eax, word [edi]
mov esi, eax
test ax, ax
je 0x41e497
cmp word [edi + 2], 0
jne 0x41e3be
push 1
push dword [esp + 0x1c]
mov ecx, eax
call fcn.0041e4a0
add esp, 8
pop edi
pop esi
pop ecx
ret
test eax, 0xffffff80
je 0x41e3c9
xor eax, eax
jmp 0x41e3d4
push 2
push eax
call fcn.004d4154
add esp, 8
mov ecx, esi
and ecx, 0xffdf
test eax, eax
movzx edx, cx
mov ecx, esi
cmove edx, ecx
cmp dx, 0x56
jne 0x41e44a
movzx eax, word [edi + 2]
mov esi, eax
test eax, 0xffffff80
je 0x41e3fd
xor eax, eax
jmp 0x41e408
push 2
push eax
call fcn.004d4154
add esp, 8
mov ecx, esi
and ecx, 0xffdf
test eax, eax
movzx edx, cx
mov ecx, esi
cmove edx, ecx
cmp dx, 0x4b
jne 0x41e44a
push ebx
push 0x10
lea eax, [esp + 0x10]
push eax
lea eax, [edi + 4]
push eax
call fcn.004cfd31
mov ecx, dword [esp + 0x18]
add esp, 0xc
xor ebx, ebx
movzx edx, al
cmp word [ecx], bx
cmove ebx, edx
mov al, bl
pop ebx
pop edi
pop esi
pop ecx
ret
xor esi, esi
nop dword [eax]
push edi
push dword [esi*8 + 0x51ba08]
call fcn.004ce516
add esp, 8
test eax, eax
je 0x41e48c
inc esi
cmp esi, 0x6d
jl 0x41e450
cmp byte [esp + 0x10], 0
jne 0x41e497
xor edx, edx
mov ecx, edi
call fcn.0041e2a0
movzx ecx, ax
test cx, cx
je 0x41e497
pop edi
pop esi
add esp, 4
jmp fcn.0041ed70
mov al, byte [esi*8 + 0x51ba0c]
pop edi
pop esi
pop ecx
ret
pop edi
xor al, al
pop esi
pop ecx
ret

Function at 0x41e4a0
Capabilities:
Log keystrokes via polling

Disassembly:
push ecx
push ebx
mov ebx, ecx
push edi
mov edi, edx
cmp bx, 0xa
jne 0x41e4b3
pop edi
mov al, 0xd
pop ebx
pop ecx
ret
push ebp
push dword [esp + 0x14]
push ebx
call dword [sym.imp.USER32.dll_VkKeyScanExW]
movzx eax, ax
mov edx, eax
mov dword [esp + 0xc], eax
shr edx, 8
cmp dl, 0xff
jne 0x41e527
cmp al, 0xff
jne 0x41e527
cmp byte [esp + 0x18], 0
je 0x41e530
movzx ebp, bx
test ebp, 0xffffff80
jne 0x41e530
push 0x103
push ebp
call fcn.004d4154
add esp, 8
test eax, eax
je 0x41e530
push esi
push 2
push ebp
call fcn.004d4154
push 1
push ebp
mov esi, eax
call fcn.004d4154
add esp, 0x10
test eax, eax
mov al, bl
setne dl
and al, 0xdf
movzx ecx, al
test esi, esi
movzx eax, bl
cmove ecx, eax
mov bl, cl
pop esi
jmp 0x41e52b
mov ebx, dword [esp + 0xc]
test dl, 0x38
je 0x41e537
pop ebp
pop edi
xor al, al
pop ebx
pop ecx
ret
test edi, edi
je 0x41e577
mov al, dl
and al, 6
cmp al, 6
jne 0x41e548
or byte [edi], 8
jmp 0x41e566
test dl, 2
je 0x41e557
mov al, byte [edi]
test al, 3
jne 0x41e557
or al, 1
mov byte [edi], al
test dl, 4
je 0x41e566
mov al, byte [edi]
test al, 0xc
jne 0x41e566
or al, 4
mov byte [edi], al
test dl, 1
je 0x41e577
mov cl, byte [edi]
test cl, 0x30
jne 0x41e577
or cl, 0x10
mov byte [edi], cl
pop ebp
pop edi
mov al, bl
pop ebx
pop ecx
ret
Function at 0x41e950
Capabilities:
Log keystrokes

Disassembly:
push ebx
push esi
movzx esi, cl
mov bl, dl
lea eax, [esi - 0x13]
cmp eax, 0x92
ja case.0x41e96c.20
movzx eax, byte [eax + 0x41ec0c]
jmp dword [eax*4 + 0x41eba0]
mov ecx, 0x2a
xor eax, eax
movzx ecx, cx
test bl, bl
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x136
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x1d
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x11d
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x38
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x138
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x15b
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x15c
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x45
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x52
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x4f
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x50
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x51
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x4b
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x4c
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x4d
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x47
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x48
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x49
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x53
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x145
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x135
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x37
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x4a
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x4e
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
xor eax, eax
mov ecx, 0x137
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
push 0
push esi
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
movzx ecx, ax
test cx, cx
jne 0x41eb5d
pop esi
xor eax, eax
pop ebx
ret
add esi, 0xfffffffd
cmp esi, 0xb4
ja case.0x41eb73.4
movzx eax, byte [esi + 0x41ecac]
jmp dword [eax*4 + 0x41eca0]
or ecx, 0x100
xor eax, eax
test bl, bl
movzx ecx, cx
pop esi
cmove eax, ecx
pop ebx
ret
mov eax, ecx
or ecx, 0x100
test bl, bl
pop esi
cmovne eax, ecx
pop ebx
ret
Function at 0x41ed70
Capabilities:
Log keystrokes

Disassembly:
push ebx
mov ebx, ecx
movzx edx, bx
mov eax, edx
cmp edx, 0x11c
ja 0x41ede8
je 0x41ede4
sub eax, 0x1d
cmp eax, 0x36
ja case.0x41edf9.286
movzx eax, byte [eax + 0x41ee9c]
jmp dword [eax*4 + 0x41ee50]
mov al, 0xa0
pop ebx
ret
mov al, 0xa2
pop ebx
ret
mov al, 0xa4
pop ebx
ret
mov al, 0x6a
pop ebx
ret
mov al, 0x6d
pop ebx
ret
mov al, 0x6b
pop ebx
ret
mov al, 0x2e
pop ebx
ret
mov al, 0xc
pop ebx
ret
mov al, 0x2d
pop ebx
ret
mov al, 0x26
pop ebx
ret
mov al, 0x28
pop ebx
ret
mov al, 0x25
pop ebx
ret
mov al, 0x27
pop ebx
ret
mov al, 0x24
pop ebx
ret
mov al, 0x23
pop ebx
ret
mov al, 0x21
pop ebx
ret
mov al, 0x22
pop ebx
ret
mov al, 0x13
pop ebx
ret
mov al, 0xd
pop ebx
ret
sub eax, 0x11d
cmp eax, 0x40
ja case.0x41edf9.286
movzx eax, byte [eax + 0x41eefc]
jmp dword [eax*4 + 0x41eed4]
mov al, 0xa1
pop ebx
ret
mov al, 0xa3
pop ebx
ret
mov al, 0xa5
pop ebx
ret
mov al, 0x5b
pop ebx
ret
mov al, 0x5c
pop ebx
ret
mov al, 0x90
pop ebx
ret
mov al, 0x6f
pop ebx
ret
mov al, 0x5d
pop ebx
ret
mov al, 0x2c
pop ebx
ret
test ebx, 0x100
je 0x41ee41
movzx eax, dl
push 1
or eax, 0xe000
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
test eax, eax
jne 0x41ee4d
push 1
movzx eax, bl
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
pop ebx
ret
Function at 0x420b40
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push esi
mov esi, dword [esp + 8]
not ecx
cmp esi, 8
jb 0x420bfd
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4f3708]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4f3708]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4f3708]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4f3708]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4f3708]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4f3708]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4f3708]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4f3708]
sub edi, 1
jne 0x420b56
pop edi
test esi, esi
je 0x420c1b
movzx eax, byte [edx]
lea edx, [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4f3708]
sub esi, 1
jne 0x420c01
not ecx
mov eax, ecx
pop esi
ret

Function at 0x421030
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
test byte [esi], 1
jne 0x421063
push 0
lea eax, [esp + 8]
push eax
push dword [esp + 0x14]
push edx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x42105c
mov dword [esi + 8], 7
pop esi
pop ecx
ret
mov eax, dword [esp + 4]
pop esi
pop ecx
ret
mov ecx, dword [esi + 0x10]
xor eax, eax
push ebx
mov ebx, dword [esi + 0x18]
push ebp
push edi
mov edi, dword [esp + 0x18]
mov ebp, edi
add ebp, ebx
adc eax, dword [esi + 0x1c]
cmp eax, dword [esi + 0x14]
jb 0x421088
ja 0x421084
cmp ebp, ecx
jbe 0x421088
mov edi, ecx
sub edi, ebx
mov ecx, dword [esi + 4]
push edi
add ecx, ebx
push ecx
push edx
call fcn.004cc730
add esp, 0xc
mov eax, edi
add dword [esi + 0x18], edi
adc dword [esi + 0x1c], 0
pop edi
pop ebp
pop ebx
pop esi
pop ecx
ret
Function at 0x422410
Capabilities:
Create directory

Disassembly:
sub esp, 0x10
mov al, byte [ecx]
mov dword [esp + 4], 0xc
mov dword [esp + 8], 0
mov dword [esp + 0xc], 1
mov dword [esp], ecx
push ebx
mov ebx, edx
push ebp
push esi
push edi
test al, al
je 0x422446
cmp byte [ecx + 1], 0x3a
jne 0x422446
mov al, byte [ecx + 2]
add ecx, 2
mov dl, al
cmp al, 0x5c
jne 0x42244f
mov dl, byte [ecx + 1]
lea esi, [ecx + 1]
cmovne esi, ecx
test dl, dl
je 0x4224a8
mov al, byte [esi]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test al, al
je 0x42247c
nop dword [eax + eax]
cmp al, 0x5c
je 0x4224b5
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x422470
xor esi, esi
test ebx, ebx
je 0x4224a8
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x14]
call ebp
test eax, eax
jne 0x42249a
call edi
cmp eax, 0xb7
jne 0x4224ba
test esi, esi
je 0x4224a8
mov byte [esi], 0x5c
inc esi
mov al, byte [esi]
test al, al
jne 0x422470
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret
mov byte [esi], 0
jmp 0x422482
test esi, esi
je 0x4224c1
mov byte [esi], 0x5c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret

Function at 0x4224d0
Capabilities:
Create directory

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
movzx esi, word [ecx]
mov ebx, edx
mov dword [esp + 0x10], 0xc
mov eax, esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 1
mov dword [esp + 0xc], ecx
push edi
test si, si
je 0x42250d
cmp word [ecx + 2], 0x3a
jne 0x42250d
movzx eax, word [ecx + 4]
add ecx, 4
movzx edi, ax
movzx edx, ax
cmp ax, 0x5c
jne 0x42251d
movzx edx, word [ecx + 2]
cmp edi, 0x5c
lea esi, [ecx + 2]
cmovne esi, ecx
test dx, dx
je 0x422591
movzx ecx, word [esi]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
nop word [eax + eax]
movzx eax, cx
test ax, ax
je 0x42255a
cmp ax, 0x5c
je 0x42259e
movzx eax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x422548
xor esi, esi
test ebx, ebx
je 0x422591
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x14]
call ebp
test eax, eax
jne 0x422578
call edi
cmp eax, 0xb7
jne 0x4225a5
test esi, esi
je 0x422591
mov eax, 0x5c
mov word [esi], ax
add esi, 2
movzx eax, word [esi]
mov ecx, eax
test ax, ax
jne 0x422540
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret
xor eax, eax
mov word [esi], ax
jmp 0x422560
test esi, esi
je 0x4225b1
mov eax, 0x5c
mov word [esi], ax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
Function at 0x4225c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
push 1
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x4227d1
mov eax, dword [esi + 0x30]
and eax, dword [esi + 0x34]
cmp eax, 0xffffffff
je 0x4227d1
mov ebx, dword [ebp + 0xc]
mov dword [esi + 8], 0
test bl, 1
je 0x422672
cmp word [esi + 0x70], 0
mov ebx, dword [ebp + 8]
jne 0x422623
mov edx, ebx
mov ecx, esi
call fcn.00421720
cmp dword [esi + 8], 0
jne 0x4227c0
mov eax, 1
mov word [esi + 0x70], ax
push dword [ebx + 0x2c]
mov edx, edi
mov ecx, esi
push dword [ebx + 0x28]
call fcn.00421a30
add esp, 8
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], edx
cmp dword [esi + 8], 0
jne 0x42265b
mov eax, dword [esi + 0xe8]
or eax, dword [esi + 0xec]
je 0x42265b
mov eax, 5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, esi
mov word [esi + 0x70], ax
call fcn.00421600
mov eax, dword [esi + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
test byte [eax + 8], 0x10
je 0x4226a8
test bl, 2
je 0x42269f
mov edx, 1
mov ecx, edi
test ebx, ebx
jns 0x422692
call fcn.004224d0
jmp 0x422697
call fcn.00422410
test eax, eax
je 0x4227b9
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 4
je 0x4226f5
xor edx, edx
mov ecx, edi
test ebx, ebx
jns 0x4226bc
call fcn.004224d0
jmp 0x4226c1
call fcn.00422410
test eax, eax
je 0x4227b9
mov eax, dword [ebp + 8]
push 0
mov eax, dword [eax + 8]
push eax
push 2
push 0
push 0
push 0x40000000
push edi
test ebx, ebx
jns 0x4226ea
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4226f0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov eax, dword [ebp + 8]
cmp edi, 0xffffffff
je 0x4227b9
mov edx, eax
mov ecx, esi
call fcn.00421720
cmp dword [esi + 8], 0
jne 0x42279c
cmp dword [esi + 0x4c], 0
jne 0x422732
push 0x4000
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 0x4c], eax
test eax, eax
jne 0x422732
mov dword [esi + 8], 2
cmp dword [esi + 8], 0
jne 0x42279c
mov edx, dword [esi + 0x4c]
mov ecx, esi
push 0
push 0x4000
call fcn.00421a30
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x42277d
push 0
lea eax, [esp + 0x10]
push eax
push ebx
push dword [esi + 0x4c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x422776
cmp dword [esp + 0xc], ebx
jne 0x422776
cmp dword [esi + 8], 0
je 0x422738
jmp 0x42277d
mov dword [esi + 8], 3
cmp dword [esi + 8], 0
mov ebx, dword [ebp + 0xc]
jne 0x42279c
mov ecx, dword [ebp + 8]
lea eax, [ecx + 0x1c]
push eax
lea eax, [ecx + 0xc]
push eax
lea eax, [ecx + 0x14]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp ebx, 4
je 0x4227c0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00421600
mov eax, dword [esi + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 8], 1
mov ecx, esi
call fcn.00421600
mov eax, dword [esi + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x423270
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x44
lea eax, [esp + 0x10]
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebp, edx
push eax
push dword [edi + 0x64]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x42329a
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov ebx, dword [esp + 0x20]
mov esi, ebx
and esi, 1
mov eax, ebx
mov ecx, esi
or ecx, 2
and al, 2
mov eax, ebx
cmove ecx, esi
mov edx, ecx
or edx, 4
and al, 4
cmove edx, ecx
mov ecx, ebx
and ecx, 0x10
mov eax, edx
or eax, 0x10
mov dword [esp + 0x14], ecx
test ecx, ecx
cmove eax, edx
mov edx, 0x81000000
mov ecx, eax
or ecx, 0x20
and bl, 0x20
mov ebx, 0x41000000
cmove ecx, eax
mov eax, dword [esp + 0x14]
test eax, eax
cmove ebx, edx
or ebx, ecx
test esi, esi
jne 0x423303
test eax, eax
mov ebx, 0x41800000
mov edx, 0x81800000
cmove ebx, edx
or ebx, ecx
push 0
push dword [edi + 0x64]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ecx, ecx
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], ecx
cmp eax, 0x28
jbe 0x4233e4
mov eax, dword [edi + 0x18]
or eax, dword [edi + 0x1c]
jne 0x4233e4
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
push eax
push eax
push dword [edi + 0x64]
call esi
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [edi + 0x64]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x24
push dword [edi + 0x64]
call esi
push 0
lea eax, [esp + 0x18]
push eax
push 4
lea eax, [esp + 0x24]
push eax
push dword [edi + 0x64]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [esp + 0x10], ax
jne 0x4233d9
cmp dword [edi + 0x54], 0
mov eax, dword [esp + 0x18]
lea ecx, [eax + 0x34]
jb 0x4233d9
ja 0x423392
cmp dword [edi + 0x50], ecx
jbe 0x4233d9
push 0
push 0
push eax
push dword [edi + 0x64]
call esi
push 0
lea eax, [esp + 0x18]
push eax
push 4
lea eax, [esp + 0x28]
push eax
push dword [edi + 0x64]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x1c]
cmp eax, 0x5a4d
je 0x4233d3
cmp eax, 0x454e
je 0x4233d3
cmp eax, 0x454c
je 0x4233d3
cmp eax, 0x4550
jne 0x4233d9
or ebx, 0x400000
push 0
push 0
push 0
push dword [edi + 0x64]
call esi
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
sub ecx, 0xd53e8000
push 0
push 0x989680
sbb eax, 0x19db1de
mov dword [ebp + 0x10], ebx
push eax
push ecx
call fcn.004e87f0
mov ecx, dword [esp + 0x34]
mov dword [ebp], eax
sub ecx, 0xd53e8000
mov eax, dword [esp + 0x38]
push 0
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.004e87f0
mov ecx, dword [esp + 0x24]
mov dword [ebp + 4], eax
sub ecx, 0xd53e8000
mov eax, dword [esp + 0x28]
push 0
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.004e87f0
mov dword [ebp + 8], eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx ecx, word [esp + 0x10]
movzx eax, word [esp + 0x14]
shl ecx, 0x10
pop edi
or ecx, eax
xor eax, eax
pop esi
mov dword [ebp + 0xc], ecx
pop ebp
pop ebx
add esp, 0x44
ret