joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4038f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
cmp byte [esi], 0
je 0x403937
cmp byte [esi + 1], 0
je 0x40393f
mov eax, dword [esi + 4]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebx
je 0x403952
cmp byte [esi + 1], 0
je 0x403946
mov edx, dword [esi + 4]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, eax
sub ebx, dword [esi + 0xc]
mov dword [ebp - 4], ebx
jmp 0x40395a
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x1c], ecx
jmp 0x403911
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0
mov ebx, dword [ebp - 4]
jmp 0x40395a
mov eax, dword [esi + 0x1c]
mov dword [ebp - 4], eax
mov ebx, eax
push edi
mov edi, 0xffff
mov dword [ebp - 8], edi
cmp ebx, edi
jae 0x40396c
mov dword [ebp - 8], ebx
mov edi, ebx
push 0x404
call fcn.00502f3e
add esp, 4
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x403989
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 4
mov dword [ebp - 0x14], 0xffffffff
cmp edi, eax
jbe 0x403a9d
jmp 0x4039a9
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
add eax, 0x400
mov dword [ebp - 0xc], edi
cmp eax, edi
ja 0x4039b8
mov dword [ebp - 0xc], eax
mov eax, ebx
sub eax, dword [ebp - 0xc]
sub ebx, eax
mov dword [ebp - 0x1c], eax
cmp ebx, 0x404
jbe 0x4039cf
mov ebx, 0x404
cmp byte [esi], 0
je 0x4039f4
cmp byte [esi + 1], 0
je 0x403a9d
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push 0
push 0
add ecx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4039f7
mov dword [esi + 0x1c], eax
cmp byte [esi], 0
mov edi, ebx
je 0x403a20
mov ecx, dword [ebp - 0x10]
mov edx, dword [esi + 4]
push 0
lea eax, [ebp - 0x18]
push eax
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403a1b
mov byte [esi + 8], 1
mov eax, dword [ebp - 0x18]
jmp 0x403a49
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea edx, [eax + ebx]
cmp edx, ecx
jbe 0x403a31
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0x14]
mov edx, dword [ebp - 0x10]
push edi
add ecx, eax
push ecx
push edx
call fcn.005064a0
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div ebx
cmp eax, 1
jne 0x403a9d
lea eax, [ebx - 3]
test eax, eax
js 0x403a8b
lea esp, [esp]
mov ecx, dword [ebp - 0x10]
dec eax
cmp byte [eax + ecx], 0x50
jne 0x403a7f
cmp byte [eax + ecx + 1], 0x4b
jne 0x403a7f
cmp byte [eax + ecx + 2], 5
jne 0x403a7f
cmp byte [eax + ecx + 3], 6
je 0x403a85
test eax, eax
jns 0x403a60
jmp 0x403a8b
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x403a9d
mov edx, dword [ebp - 8]
cmp dword [ebp - 0xc], edx
jb 0x4039a0
mov eax, dword [ebp - 0x10]
push eax
call fcn.00502f04
mov eax, dword [ebp - 0x14]
add esp, 4
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404920
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
cmp dword [esi], 0
push edi
jne 0x4049bc
cmp dword [esi + 4], 0xffffffff
jne 0x4049bc
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, edi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404950
sub eax, edx
sar eax, 1
movzx eax, word [esi + eax*2 + 0x242]
cmp eax, 0x5c
je 0x404987
cmp eax, 0x2f
je 0x404987
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404974
mov eax, dword [0x55a9dc]
mov dword [edi], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp + 8]
push ecx
call fcn.004036d0
add esp, 4
test eax, eax
jne 0x4049a2
mov eax, dword [ebp + 8]
pop edi
pop ebp
ret 4
call fcn.00403ac0
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x200
pop edi
pop ebp
ret 4
mov eax, 0x1000000
pop edi
pop ebp
ret 4

Function at 0x405080
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x57a898]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x4050b4
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4050b4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x40519e
mov ecx, ebx
mov edx, ebx
cmp ax, 0x2f
je 0x4050d0
cmp ax, 0x5c
jne 0x4050d2
mov ecx, edx
movzx eax, word [edx + 2]
add edx, 2
test ax, ax
jne 0x4050c4
push edi
cmp ecx, ebx
je 0x405112
sub ecx, ebx
sar ecx, 1
lea edi, [ecx + ecx]
push edi
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.005064a0
lea edx, [ebp - 0x414]
push edx
xor ecx, ecx
push esi
mov word [ebp + edi - 0x414], cx
call fcn.00405080
add esp, 0x14
xor eax, eax
mov word [ebp - 0x20c], ax
test esi, esi
je 0x40513f
lea edx, [ebp - 0x20c]
mov eax, esi
sub edx, esi
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x405130
mov eax, ebx
mov edx, ebx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405143
lea edi, [ebp - 0x20c]
sub eax, edx
add edi, 0xfffffffe
lea esp, [esp]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x405160
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop edi
cmp eax, 0xffffffff
jne 0x40519e
push 0
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00502eb5
mov esp, ebp
pop ebp
ret
Function at 0x405d50
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp byte [esi + 0x2d], 0
push edi
mov edi, dword [ebp + 0xc]
mov eax, ebx
je 0x405e3b
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x405d87
cmp dword [esi + 0x40], edi
jae 0x405d87
push eax
call fcn.0040d812
add esp, 4
mov dword [esi + 0x3c], 0
cmp dword [esi + 0x3c], 0
jne 0x405d9f
lea eax, [edi + edi]
push eax
call fcn.0040d81d
add esp, 4
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
mov ecx, dword [esi + 0x3c]
push edi
push ebx
push ecx
call fcn.005064a0
add esp, 0xc
xor ebx, ebx
test edi, edi
je 0x405e38
mov edx, dword [esi + 0x3c]
mov cl, byte [ebx + edx]
mov edi, dword [esi + 0x30]
mov byte [ebp + 8], cl
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x558b88]
mov dword [ebp - 4], ecx
mov eax, dword [esi + 0x38]
shr edi, 8
xor dword [ebp - 4], edi
mov ecx, dword [ebp - 4]
mov dword [esi + 0x30], ecx
movzx ecx, cl
add ecx, dword [esi + 0x34]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0x34], ecx
shr ecx, 0x18
xor ecx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x558b88]
and edx, 0xfffd
mov dword [esi + 0x38], eax
mov ecx, dword [esi + 0x3c]
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, byte [ebp + 8]
inc ebx
mov byte [ebx + ecx - 1], al
cmp ebx, dword [ebp + 0xc]
jb 0x405db7
mov edi, dword [ebp + 0xc]
mov eax, dword [esi + 0x3c]
mov edx, dword [esi + 0x20]
test edx, edx
je 0x405e7a
mov ecx, dword [esi + 0x24]
lea ebx, [ecx + edi]
cmp ebx, dword [esi + 0x28]
jb 0x405e5f
pop edi
mov dword [esi + 0x14], 0x30000
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
push eax
add ecx, edx
push ecx
call fcn.005064a0
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x405e9c
push 0
lea edx, [ebp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
mov dword [esi + 0x14], 0x1000000
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x408190
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52bd72
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x57a898]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 8
mov dword [esp + 0x24], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, esi
call fcn.0040fed9
push 0xc
call fcn.0040d7e3
add esp, 4
mov dword [esp + 0x18], eax
xor edi, edi
mov dword [esp + 0x30], edi
cmp eax, edi
je 0x408201
mov ecx, eax
call fcn.0041045a
mov edi, eax
or ebx, 0xffffffff
push 0x55aab8
mov ecx, esi
mov dword [esp + 0x34], ebx
call fcn.004105e9
mov ecx, dword [esi + 0x48]
push ecx
lea ecx, [esp + 0x18]
call fcn.0040b690
lea ecx, [esp + 0x14]
mov dword [esp + 0x30], 1
call fcn.00409c40
mov ecx, eax
call fcn.00409cc0
mov eax, dword [esp + 0x14]
mov ecx, 0x55ab08
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408268
test dx, dx
je 0x408264
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408268
add eax, 4
add ecx, 4
test dx, dx
jne 0x408242
xor eax, eax
jmp 0x40826c
sbb eax, eax
sbb eax, ebx
test eax, eax
sete al
test al, al
jne 0x4082d6
mov eax, dword [esp + 0x14]
mov ecx, 0x55ab0c
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4082a6
test dx, dx
je 0x4082a2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4082a6
add eax, 4
add ecx, 4
test dx, dx
jne 0x408280
xor eax, eax
jmp 0x4082aa
sbb eax, eax
sbb eax, ebx
test eax, eax
sete al
test al, al
je 0x4082ba
call fcn.00408320
jmp 0x4082d6
lea edx, [esp + 0x14]
push 0x558960
push edx
call fcn.00401070
add esp, 8
test al, al
je 0x4082d6
push esi
call fcn.00408740
test edi, edi
je 0x4082e5
mov eax, dword [edi]
mov edx, dword [eax + 4]
push 1
mov ecx, edi
call edx
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x408306
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408900
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52b76b
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
push esi
push edi
mov eax, dword [0x57a898]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ecx]
mov eax, dword [0x5826a8]
push ecx
push 0x83
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edx, dword [0x5826a4]
mov esi, eax
push esi
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov eax, dword [0x5826a4]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
lea ecx, [ebp - 0xcc]
push ecx
mov esi, eax
call fcn.00409010
mov edx, dword [ebp + 8]
mov dword [ebp - 4], 0
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0xb4]
call fcn.0040a090
test eax, eax
jne 0x4089ac
mov eax, dword [ebp - 0xcc]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + ecx - 0xc0]
lea ecx, [ebp + ecx - 0xcc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x4089cd
or eax, 4
jmp 0x4089cd
mov ecx, dword [ebp - 0xcc]
mov ecx, dword [ecx + 4]
mov eax, dword [ebp + ecx - 0x94]
lea ecx, [ebp + ecx - 0xcc]
neg eax
sbb eax, eax
and eax, 0xfffffffc
add eax, 4
and eax, 0x17
test dword [ecx + 0x10], eax
mov dword [ecx + 0xc], eax
je 0x4089df
push 0
call fcn.00407f20
push 0
push edi
push esi
lea edx, [ebp - 0xbc]
push edx
call fcn.00408ae0
lea eax, [ebp - 0xb4]
call fcn.0040a180
test eax, eax
jne 0x408a33
mov eax, dword [ebp - 0xcc]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + ecx - 0xc0]
lea ecx, [ebp + ecx - 0xcc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x408a21
or eax, 4
and eax, 0x17
mov dword [ecx + 0xc], eax
test dword [ecx + 0x10], eax
je 0x408a33
push 0
call fcn.00407f20
lea ecx, [ebp - 0x5c]
mov dword [ebp - 4], 0xffffffff
call fcn.00409100
lea ecx, [ebp - 0x5c]
push ecx
mov dword [ebp - 0x5c], vtable.std::ios_base.0
call fcn.0051ea28
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x409010
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52b737
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x57a898]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [edi], 0x55afa0
mov dword [edi + 0x10], 0x55afa8
mov dword [edi + 0x70], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
lea esi, [edi + 0x18]
push esi
mov dword [ebp - 4], ebx
push edi
mov dword [ebp - 0x10], 1
call fcn.00409fe0
mov dword [ebp - 4], 1
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push esi
mov dword [edi + ecx], vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
call fcn.0040a7c0
lea edx, [esi + 8]
mov dword [esi + 0x10], edx
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
mov dword [esi], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [esi + 0x50], bl
mov byte [esi + 0x49], bl
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], ebx
mov eax, dword [esi + 0x24]
mov dword [eax], ebx
mov ecx, dword [esi + 0x34]
mov dword [ecx], ebx
mov edx, dword [esi + 0x10]
mov dword [edx], ebx
mov eax, dword [esi + 0x20]
mov edx, dword [0x582940]
mov dword [eax], ebx
mov ecx, dword [esi + 0x30]
mov dword [ecx], ebx
mov dword [esi + 0x54], ebx
mov dword [esi + 0x4c], edx
mov dword [esi + 0x44], ebx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x409220
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52b448
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x57a898]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edi, ecx
cmp ebx, 0xffffffff
jne 0x40925c
xor eax, eax
jmp 0x4093ec
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x409285
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x409285
dec dword [eax]
mov edi, dword [edi + 0x24]
mov eax, dword [edi]
lea ecx, [eax + 1]
mov dword [edi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x4093ec
cmp dword [edi + 0x54], 0
je 0x4093e9
mov ecx, dword [edi + 0x10]
lea edx, [edi + 0x48]
cmp dword [ecx], edx
jne 0x4092ad
mov edx, dword [edi + 0x3c]
mov eax, dword [edi + 0x40]
mov dword [ecx], edx
mov ecx, dword [edi + 0x20]
mov dword [ecx], eax
mov edx, dword [edi + 0x30]
sub eax, eax
mov dword [edx], eax
cmp dword [edi + 0x44], 0
jne 0x4092d3
mov edi, dword [edi + 0x54]
movsx eax, bl
push edi
push eax
call fcn.00503b04
add esp, 8
cmp eax, 0xffffffff
je 0x4093e9
mov eax, ebx
jmp 0x4093ec
lea esi, [ebp - 0x2c]
mov byte [ebp - 0x2d], bl
call fcn.00409de0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x18]
jmp 0x4092f0
mov edx, eax
cmp ebx, 0x10
jae 0x4092fc
lea edx, [ebp - 0x2c]
mov eax, edx
add edx, dword [ebp - 0x1c]
mov ecx, dword [edi + 0x44]
mov esi, dword [ecx]
lea ebx, [ebp - 0x34]
push ebx
push edx
push eax
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x2d]
push edx
lea eax, [edi + 0x4c]
push eax
mov eax, dword [esi + 0x14]
call eax
test eax, eax
js 0x4093da
cmp eax, 1
jg 0x409390
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov ecx, eax
cmp ebx, 0x10
jae 0x40933c
lea ecx, [ebp - 0x2c]
mov esi, dword [ebp - 0x34]
sub esi, ecx
je 0x409365
cmp ebx, 0x10
jae 0x40934b
lea eax, [ebp - 0x2c]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call fcn.005044a6
add esp, 0x10
cmp esi, eax
jne 0x4093da
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x2d]
mov byte [edi + 0x49], 1
cmp dword [ebp - 0x38], edx
jne 0x4093c6
test esi, esi
jne 0x4092f0
cmp dword [ebp - 0x1c], 0x20
jae 0x4093da
push esi
lea ebx, [esi + 8]
lea esi, [ebp - 0x2c]
call fcn.00409e40
jmp 0x4092e5
cmp eax, 3
jne 0x4093da
mov edi, dword [edi + 0x54]
movsx eax, byte [ebp - 0x2d]
push edi
push eax
call fcn.00503b04
add esp, 8
cmp eax, 0xffffffff
je 0x4093b0
mov esi, dword [ebp + 8]
jmp 0x4093b3
or esi, 0xffffffff
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408a90
mov eax, esi
jmp 0x4093ec
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408a90
mov eax, dword [ebp + 8]
jmp 0x4093ec
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408a90
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00502eb5
mov esp, ebp
pop ebp
ret 4
Function at 0x40a2b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52b478
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x57a898]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebx + 0x44], 0
je 0x40a456
cmp byte [ebx + 0x49], 0
je 0x40a456
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
push 0xffffffffffffffff
mov ecx, ebx
call edx
cmp eax, 0xffffffff
je 0x40a443
lea esi, [ebp - 0x2c]
call fcn.00409de0
mov dword [ebp - 4], 0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp edi, 0x10
jae 0x40a323
lea edx, [ebp - 0x2c]
mov eax, edx
mov ecx, dword [ebx + 0x44]
mov esi, dword [ecx]
lea edi, [ebp - 0x30]
push edi
mov edi, dword [ebp - 0x1c]
add edi, edx
push edi
push eax
lea eax, [ebx + 0x4c]
push eax
mov eax, dword [esi + 0x18]
call eax
sub eax, 0
je 0x40a363
dec eax
je 0x40a367
sub eax, 2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
je 0x40a451
call fcn.00408a90
xor al, al
jmp 0x40a458
mov byte [ebx + 0x49], 0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp edi, 0x10
jae 0x40a377
lea edx, [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
sub esi, edx
je 0x40a3a4
cmp edi, 0x10
jae 0x40a386
lea eax, [ebp - 0x2c]
mov ecx, dword [ebx + 0x54]
push ecx
push esi
push 1
push eax
call fcn.005044a6
add esp, 0x10
cmp esi, eax
jne 0x40a434
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
cmp byte [ebx + 0x49], 0
je 0x40a447
test esi, esi
jne 0x40a317
mov ecx, dword [ebp - 0x1c]
or edx, 0xffffffff
sub edx, ecx
cmp edx, 8
jbe 0x40a473
lea esi, [ecx + 8]
cmp esi, 0xfffffffe
ja 0x40a473
cmp edi, esi
jae 0x40a41d
push ecx
push esi
lea ecx, [ebp - 0x2c]
call fcn.0040a910
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
test esi, esi
je 0x40a317
mov ecx, eax
cmp edi, 0x10
jae 0x40a3f9
lea ecx, [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ecx + edx], eax
mov dword [ecx + edx + 4], eax
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
jae 0x40a414
lea eax, [ebp - 0x2c]
mov byte [eax + esi], 0
jmp 0x40a311
test esi, esi
jne 0x40a3ef
mov dword [ebp - 0x1c], esi
cmp edi, 0x10
jae 0x40a42c
lea eax, [ebp - 0x2c]
mov byte [eax], 0
jmp 0x40a311
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408a90
xor al, al
jmp 0x40a458
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00408a90
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00502eb5
mov esp, ebp
pop ebp
ret
push str.string_too_long
call fcn.0051e01a
int3
Function at 0x40a7c0
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52b3bb
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x57a898]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea ecx, [esi + 4]
mov dword [esi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.0051ea66
push 4
mov dword [ebp - 4], 0
call fcn.0040d7e3
mov edi, eax
add esp, 4
test edi, edi
je 0x40a83c
call fcn.0051e43b
mov dword [edi], eax
call fcn.0051e1fa
push 0
lea ecx, [ebp - 0x10]
mov ebx, eax
call fcn.0051e12f
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x40a832
inc eax
mov dword [ebx + 4], eax
lea ecx, [ebp - 0x10]
call fcn.0051e157
jmp 0x40a83e
xor edi, edi
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
mov dword [esi + 0x38], edi
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], 0
mov eax, dword [esi + 0x24]
mov dword [eax], 0
mov ecx, dword [esi + 0x34]
mov dword [ecx], 0
mov edx, dword [esi + 0x10]
mov dword [edx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov ecx, dword [esi + 0x30]
mov dword [ecx], 0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40b360
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40b37b
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40b3b2
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x40b3ae
jmp 0x40b3a0
cmp esi, eax
jae 0x40b3b2
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x40b3a0
cmp esi, eax
jb 0x40b3b9
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40baa0
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52bc5b
mov eax, dword fs:[0]
push eax
sub esp, 0x7d8
mov eax, dword [0x57a898]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx eax, ax
call fcn.0040cf40
movzx esi, ax
call fcn.0040c3b0
call fcn.0040e354
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40baff
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x7e4], eax
mov dword [ebp - 4], 0
call fcn.00415a12
mov eax, dword [eax + 8]
push 0x3e8
lea ecx, [ebp - 0x7e0]
push ecx
push 0xfa1
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x7e0]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40bb41
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x7e0]
push edx
lea ecx, [ebp - 0x7e4]
call fcn.00407620
mov esi, dword [ebp - 0x7e4]
push esi
mov ecx, edi
call fcn.0041c1e1
push 0x3eb
push 0xfa2
call fcn.0040c2b0
push 1
push 0xfa4
call fcn.0040c2b0
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bbaf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00502eb5
mov esp, ebp
pop ebp
ret

Function at 0x40c3b0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x57a898]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x11c
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.00506220
add esp, 0xc
lea ecx, [ebp - 0x120]
push ecx
mov dword [ebp - 0x120], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x40c41e
cmp dword [ebp - 0x11c], 5
jne 0x40c41e
cmp dword [ebp - 0x118], 1
jne 0x40c41e
movzx edx, si
push edx
call dword [sym.imp.KERNEL32.dll_SetThreadLocale]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00502eb5
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_SetThreadUILanguage]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00502eb5
mov esp, ebp
pop ebp
ret