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 + 0x4fc8b8]
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 + 0x4fc8b8], ebp
mov eax, edx
mov dword [ecx*8 + 0x4fc8bc], edx
pop ebp
add esp, 0x288
ret
test edx, edx
je 0x41dfe6
cmp dword [eax*8 + 0x4fc8bc], 0
jne 0x41dfe6
mov dword [eax*8 + 0x4fc8bc], edx
mov eax, dword [eax*8 + 0x4fc8bc]
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 0x41e0c9
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]
pop edi
test eax, eax
je 0x41e061
push ebx
push ecx
lea eax, [esp + 0x94]
push eax
push str.Layout_File
lea edx, [esp + 0x24]
call fcn.004b0de0
add esp, 0x10
test eax, eax
je 0x41e061
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
jmp 0x41e063
xor esi, esi
mov eax, dword [esp + 0xc]
cmp ebp, eax
je 0x41e074
push 0
push eax
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
test esi, esi
je 0x41e0c9
push str.KbdLayerDescriptor
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41e0c2
call eax
cmp dword [0x4fc888], 0
mov ebx, eax
je 0x41e0b7
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x4fc888]
test eax, eax
je 0x41e0b7
cmp dword [esp + 0xc], 0
je 0x41e0b7
mov ebx, dword [ebx + 0x50]
jmp 0x41e0ba
mov ebx, dword [ebx + 0x28]
not ebx
and ebx, 1
add ebx, 3
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
mov dword [eax*8 + 0x4fc8bc], ebx
mov dword [eax*8 + 0x4fc8b8], 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 + 0x4f7174], 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 sub.VCRUNTIME140.dll_memset
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.0041e4b0
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.004af890
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 + 0x4f7170]
push ebp
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
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 ebx
push esi
push edi
mov edi, ecx
movzx eax, word [edi]
mov esi, eax
test ax, ax
je 0x41e49a
cmp word [edi + 2], 0
jne 0x41e3c0
push 1
push dword [esp + 0x20]
mov ecx, eax
call fcn.0041e4b0
add esp, 8
pop edi
pop esi
pop ebx
pop ecx
ret
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
test eax, 0xffffff80
je 0x41e3d1
xor eax, eax
jmp 0x41e3d9
push 2
push eax
call ebx
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 0x41e44c
movzx eax, word [edi + 2]
mov esi, eax
test eax, 0xffffff80
je 0x41e402
xor eax, eax
jmp 0x41e40a
push 2
push eax
call ebx
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 0x41e44c
push 0x10
lea eax, [esp + 0x10]
push eax
lea eax, [edi + 4]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstol]
mov ecx, dword [esp + 0x18]
add esp, 0xc
xor ebx, ebx
movzx edx, al
cmp word [ecx], bx
pop edi
cmove ebx, edx
pop esi
mov al, bl
pop ebx
pop ecx
ret
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
xor esi, esi
push edi
push dword [esi*8 + 0x4f7170]
call ebx
add esp, 8
test eax, eax
je 0x41e48e
inc esi
cmp esi, 0x6d
jl 0x41e454
cmp byte [esp + 0x14], 0
jne 0x41e49a
xor edx, edx
mov ecx, edi
call fcn.0041e2a0
movzx ecx, ax
test cx, cx
je 0x41e49a
pop edi
pop esi
pop ebx
add esp, 4
jmp fcn.0041ed80
mov al, byte [esi*8 + 0x4f7174]
pop edi
pop esi
pop ebx
pop ecx
ret
pop edi
pop esi
xor al, al
pop ebx
pop ecx
ret

Function at 0x41e4b0
Capabilities:
Log keystrokes via polling

Disassembly:
push ecx
push ebx
mov ebx, ecx
push edi
mov edi, edx
cmp bx, 0xa
jne 0x41e4c3
pop edi
mov al, 0xd
pop ebx
pop ecx
ret
push ebp
push esi
push dword [esp + 0x18]
push ebx
call dword [sym.imp.USER32.dll_VkKeyScanExW]
movzx eax, ax
mov edx, eax
mov dword [esp + 0x10], eax
shr edx, 8
cmp dl, 0xff
jne 0x41e537
cmp al, 0xff
jne 0x41e537
cmp byte [esp + 0x1c], 0
je 0x41e540
movzx ebp, bx
test ebp, 0xffffff80
jne 0x41e540
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
push 0x103
push ebp
call esi
add esp, 8
test eax, eax
je 0x41e540
push 2
push ebp
call esi
push 1
push ebp
mov esi, eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
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
jmp 0x41e53b
mov ebx, dword [esp + 0x10]
test dl, 0x38
je 0x41e548
pop esi
pop ebp
pop edi
xor al, al
pop ebx
pop ecx
ret
test edi, edi
je 0x41e588
mov al, dl
and al, 6
cmp al, 6
jne 0x41e559
or byte [edi], 8
jmp 0x41e577
test dl, 2
je 0x41e568
mov al, byte [edi]
test al, 3
jne 0x41e568
or al, 1
mov byte [edi], al
test dl, 4
je 0x41e577
mov al, byte [edi]
test al, 0xc
jne 0x41e577
or al, 4
mov byte [edi], al
test dl, 1
je 0x41e588
mov cl, byte [edi]
test cl, 0x30
jne 0x41e588
or cl, 0x10
mov byte [edi], cl
pop esi
pop ebp
pop edi
mov al, bl
pop ebx
pop ecx
ret
Function at 0x41e960
Capabilities:
Log keystrokes

Disassembly:
push ebx
push esi
movzx esi, cl
mov bl, dl
lea eax, [esi - 0x13]
cmp eax, 0x92
ja case.0x41e97c.20
movzx eax, byte [eax + 0x41ec1c]
jmp dword [eax*4 + 0x41ebb0]
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 0x41eb6d
pop esi
xor eax, eax
pop ebx
ret
add esi, 0xfffffffd
cmp esi, 0xb4
ja case.0x41eb83.4
movzx eax, byte [esi + 0x41ecbc]
jmp dword [eax*4 + 0x41ecb0]
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 0x41ed80
Capabilities:
Log keystrokes

Disassembly:
push ebx
mov ebx, ecx
movzx edx, bx
mov eax, edx
cmp edx, 0x11c
ja 0x41edf8
je 0x41edf4
sub eax, 0x1d
cmp eax, 0x36
ja case.0x41ee09.286
movzx eax, byte [eax + 0x41eeac]
jmp dword [eax*4 + 0x41ee60]
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.0x41ee09.286
movzx eax, byte [eax + 0x41ef0c]
jmp dword [eax*4 + 0x41eee4]
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 0x41ee51
movzx eax, dl
push 1
or eax, 0xe000
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
test eax, eax
jne 0x41ee5d
push 1
movzx eax, bl
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
pop ebx
ret
Function at 0x420c60
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push esi
mov esi, dword [esp + 8]
not ecx
cmp esi, 8
jb 0x420d1d
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 + 0x4d0f60]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d0f60]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d0f60]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d0f60]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d0f60]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d0f60]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d0f60]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d0f60]
sub edi, 1
jne 0x420c76
pop edi
test esi, esi
je 0x420d3b
movzx eax, byte [edx]
lea edx, [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d0f60]
sub esi, 1
jne 0x420d21
not ecx
mov eax, ecx
pop esi
ret

Function at 0x421140
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
test byte [esi], 1
jne 0x421173
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 0x42116c
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 0x421198
ja 0x421194
cmp ebp, ecx
jbe 0x421198
mov edi, ecx
sub edi, ebx
mov ecx, dword [esi + 4]
push edi
add ecx, ebx
push ecx
push edx
call sub.VCRUNTIME140.dll_memcpy
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 0x422520
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 0x422556
cmp byte [ecx + 1], 0x3a
jne 0x422556
mov al, byte [ecx + 2]
add ecx, 2
mov dl, al
cmp al, 0x5c
jne 0x42255f
mov dl, byte [ecx + 1]
lea esi, [ecx + 1]
cmovne esi, ecx
test dl, dl
je 0x4225b8
mov al, byte [esi]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test al, al
je 0x42258c
nop dword [eax + eax]
cmp al, 0x5c
je 0x4225c5
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x422580
xor esi, esi
test ebx, ebx
je 0x4225b8
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x14]
call ebp
test eax, eax
jne 0x4225aa
call edi
cmp eax, 0xb7
jne 0x4225ca
test esi, esi
je 0x4225b8
mov byte [esi], 0x5c
inc esi
mov al, byte [esi]
test al, al
jne 0x422580
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret
mov byte [esi], 0
jmp 0x422592
test esi, esi
je 0x4225d1
mov byte [esi], 0x5c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret

Function at 0x4225e0
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 0x42261d
cmp word [ecx + 2], 0x3a
jne 0x42261d
movzx eax, word [ecx + 4]
add ecx, 4
movzx edi, ax
movzx edx, ax
cmp ax, 0x5c
jne 0x42262d
movzx edx, word [ecx + 2]
cmp edi, 0x5c
lea esi, [ecx + 2]
cmovne esi, ecx
test dx, dx
je 0x4226a1
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 0x42266a
cmp ax, 0x5c
je 0x4226ae
movzx eax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x422658
xor esi, esi
test ebx, ebx
je 0x4226a1
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x14]
call ebp
test eax, eax
jne 0x422688
call edi
cmp eax, 0xb7
jne 0x4226b5
test esi, esi
je 0x4226a1
mov eax, 0x5c
mov word [esi], ax
add esi, 2
movzx eax, word [esi]
mov ecx, eax
test ax, ax
jne 0x422650
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret
xor eax, eax
mov word [esi], ax
jmp 0x422670
test esi, esi
je 0x4226c1
mov eax, 0x5c
mov word [esi], ax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
Function at 0x4226d0
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 0x4228e1
mov eax, dword [esi + 0x30]
and eax, dword [esi + 0x34]
cmp eax, 0xffffffff
je 0x4228e1
mov ebx, dword [ebp + 0xc]
mov dword [esi + 8], 0
test bl, 1
je 0x422782
cmp word [esi + 0x70], 0
mov ebx, dword [ebp + 8]
jne 0x422733
mov edx, ebx
mov ecx, esi
call fcn.00421830
cmp dword [esi + 8], 0
jne 0x4228d0
mov eax, 1
mov word [esi + 0x70], ax
push dword [ebx + 0x2c]
mov edx, edi
mov ecx, esi
push dword [ebx + 0x28]
call fcn.00421b40
add esp, 8
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], edx
cmp dword [esi + 8], 0
jne 0x42276b
mov eax, dword [esi + 0xe8]
or eax, dword [esi + 0xec]
je 0x42276b
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.00421710
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 0x4227b8
test bl, 2
je 0x4227af
mov edx, 1
mov ecx, edi
test ebx, ebx
jns 0x4227a2
call fcn.004225e0
jmp 0x4227a7
call fcn.00422520
test eax, eax
je 0x4228c9
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 4
je 0x422805
xor edx, edx
mov ecx, edi
test ebx, ebx
jns 0x4227cc
call fcn.004225e0
jmp 0x4227d1
call fcn.00422520
test eax, eax
je 0x4228c9
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 0x4227fa
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x422800
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov eax, dword [ebp + 8]
cmp edi, 0xffffffff
je 0x4228c9
mov edx, eax
mov ecx, esi
call fcn.00421830
cmp dword [esi + 8], 0
jne 0x4228ac
cmp dword [esi + 0x4c], 0
jne 0x422842
push 0x4000
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 0x4c], eax
test eax, eax
jne 0x422842
mov dword [esi + 8], 2
cmp dword [esi + 8], 0
jne 0x4228ac
mov edx, dword [esi + 0x4c]
mov ecx, esi
push 0
push 0x4000
call fcn.00421b40
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x42288d
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 0x422886
cmp dword [esp + 0xc], ebx
jne 0x422886
cmp dword [esi + 8], 0
je 0x422848
jmp 0x42288d
mov dword [esi + 8], 3
cmp dword [esi + 8], 0
mov ebx, dword [ebp + 0xc]
jne 0x4228ac
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 0x4228d0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00421710
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.00421710
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 0x423390
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 0x4233ba
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 0x423423
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 0x423504
mov eax, dword [edi + 0x18]
or eax, dword [edi + 0x1c]
jne 0x423504
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 0x4234f9
cmp dword [edi + 0x54], 0
mov eax, dword [esp + 0x18]
lea ecx, [eax + 0x34]
jb 0x4234f9
ja 0x4234b2
cmp dword [edi + 0x50], ecx
jbe 0x4234f9
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 0x4234f3
cmp eax, 0x454e
je 0x4234f3
cmp eax, 0x454c
je 0x4234f3
cmp eax, 0x4550
jne 0x4234f9
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.004cb8c0
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.004cb8c0
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.004cb8c0
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