joyce8/EMBER2024-capa huggingface dataset:
Function at 0x411850
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x418ab0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x411874
add eax, 8
inc ebp
cmp eax, 0x418b40
jb 0x411865
cmp ecx, dword [ebp*8 + 0x418ab0]
jne 0x411a1b
mov eax, dword [0x41a528]
cmp eax, 1
je 0x4119dd
test eax, eax
jne 0x4118a0
cmp dword [0x4168c4], 1
je 0x4119dd
cmp ecx, 0xfc
je 0x411a1b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4118db
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x411924
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4154d4
add ebx, ecx
push ebx
call fcn.00413050
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4154b4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x418ab4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00412fc0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x41cd40]
test eax, eax
je 0x4119ee
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x4119f8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x418ab4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x412120
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x41ce40]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x4122cd
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x41cd40]
lea edi, [ecx*4 + 0x41cd40]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x4122cd
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x41218e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x41219f
push 2
push ebp
push eax
call fcn.00412060
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x4122fe
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x412249
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x4121fa
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x4121e7
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x4121ca
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4122ef
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x412245
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x4121c6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4122be
mov eax, dword [esp + 0x18]
test eax, eax
je 0x412292
cmp eax, 5
jne 0x41227b
mov dword [0x41a544], eax
mov dword [0x41a540], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00413150
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x4122b2
cmp byte [ebp], 0x1a
jne 0x4122b2
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x41a540], 0x1c
jmp 0x4122d7
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x41a540], 9
pop edi
pop esi
pop ebp
mov dword [0x41a544], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x412245
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41232f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x412249
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x412249
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0xf04008], 0x8088405
inc edx
mov dword [ebx + 0xf04008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x41cd64
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cd95
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cd7d
add dl, dl
jne 0x41cda0
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cdf1
xor eax, eax
add dl, dl
jne 0x41cdad
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41ce8e
add dl, dl
jne 0x41cdbc
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdc7
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdd2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cddd
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cde7
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cd8c
mov eax, 1
add dl, dl
jne 0x41cdff
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41ce0a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdf6
sub eax, ebx
mov ebx, 1
jne 0x41ce3d
mov ecx, 1
add dl, dl
jne 0x41ce23
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce2e
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41ce1a
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd8c
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41ce54
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce5f
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41ce4b
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd8c
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41ceaf
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cd8c
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41e5a4
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0xeeba63
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov ecx, ebx
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ecx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41e655
add edx, ebx
mov eax, edx
mov esi, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
add edx, ebx
mov dword [ebp - 0x10], edx
mov edi, dword [eax + 0x20]
add edi, ebx
mov edx, dword [eax + 0x24]
add edx, ebx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 4]
cmp edx, 0xffff
jbe 0x41e63e
test esi, esi
jbe 0x41e655
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088e4
test eax, eax
jne 0x41e630
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41e655
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41e60d
jmp 0x41e655
mov ecx, edx
sub ecx, dword [eax + 0x10]
cmp ecx, dword [eax + 0x14]
jae 0x41e655
mov eax, ecx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xeeba6a
ret
Function at 0x41eec4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ecx
mov word [ebp - 2], dx
xor eax, eax
push ebp
push 0xeec473
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404cd0
xor ebx, ebx
mov eax, ebx
and eax, 0x80000001
jns 0x41eeff
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x41ef18
lea eax, [ebp - 0x10]
mov edx, dword [0xf062a4]
mov edx, dword [edx]
mov edx, dword [edx + 0xc]
call fcn.00404d30
jmp 0x41ef2b
lea eax, [ebp - 0x10]
mov edx, dword [0xf062a4]
mov edx, dword [edx]
mov edx, dword [edx + 0x10]
call fcn.00404d30
lea eax, [ebp - 0x10]
mov edx, ebx
sar edx, 1
jns 0x41ef37
adc edx, 0
mov edx, dword [edx*4 + 0xf0510c]
call fcn.00404f20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x10]
call fcn.00404f04
push eax
call fcn.00406b1c
mov esi, eax
cmp esi, 0xffffffff
je 0x41f045
mov eax, 0x40
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x40
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x41f038
mov eax, edi
cmp word [eax], 0x5a4d
jne 0x41f038
push 0
push 0
mov eax, dword [eax + 0x3c]
push eax
push esi
call fcn.00406ddc
mov eax, edi
call fcn.00403288
mov eax, 0x18
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x18
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x41f038
mov eax, edi
cmp dword [eax], 0x4550
jne 0x41f038
add eax, 4
mov dx, word [eax]
cmp dx, 0x14c
jb 0x41f038
cmp dx, 0x150
ja 0x41f038
mov eax, edi
call fcn.00403288
mov eax, 0xe0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0xe0
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x41f038
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 2]
jne 0x41f038
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
mov eax, edi
call fcn.00403288
push esi
call fcn.00406ad4
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor edx, edx
call fcn.0040502c
jne 0x41f05d
inc ebx
cmp ebx, 0x19
jne 0x41eef1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xeec47a
lea eax, [ebp - 0x10]
call fcn.00404cd0
ret
Function at 0x407e15
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42e180]
jne 0x407e1f
repz ret
jmp fcn.0040bc0c

Function at 0x41067b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
pushal
call 0x41068a
pop dword [ebp - 0x48]
mov eax, 0x358b4c5e
add eax, 0xcab5ba2c
sub dword [ebp - 0x48], eax
mov dword [ebp - 0x58], 0x94981c4b
sub dword [ebp - 0x58], 0x4645d700
mov dword [ebp - 0x54], 0x2d8265db
sub dword [ebp - 0x54], 0xfb4f1996
mov dword [ebp - 0x50], 0x2dfe2998
sub dword [ebp - 0x50], 0xe1b1e56a
mov dword [ebp - 0x4c], 0x722f7517
add dword [ebp - 0x4c], 0x8dd08ae9
lea eax, [ebp - 0x58]
push eax
mov eax, 0x62eac861
add eax, 0x9d576813
add eax, dword [ebp - 0x48]
call dword [eax]
mov dword [ebp - 0x58], 0x132383bf
add dword [ebp - 0x58], 0x614ee597
mov dword [ebp - 0x54], 0x3d65de8
add dword [ebp - 0x54], 0x3d96038d
mov dword [ebp - 0x50], 0x304f4a9c
add dword [ebp - 0x50], 0x332021d0
mov dword [ebp - 0x4c], 0xa50153ed
add dword [ebp - 0x4c], 0x5afeac13
lea ebx, [ebp - 0x58]
push ebx
push eax
mov eax, 0xc4717d1d
add eax, 0x3bd0b407
add eax, dword [ebp - 0x48]
call dword [eax]
push 0x40
push 0x1000
push 0x3f33f
push 0
call eax
mov ecx, 0x4de4
mov edx, eax
mov ebx, 0x434400
add ebx, dword [ebp - 0x48]
mov edi, 0x98a12159
sub edi, 0xf24ba13c
sub dword [ebp - 0x10], eax
mov esi, dword [ebx]
xor dword [ebp - 4], ecx
add esi, edi
mov dword [ebp - 0xc], 0x1026c63d
mov dword [edx], esi
xor dword [ebp - 0x30], 0x67738a29
add edx, 4
add ebx, 0x5431393f
add ebx, 0xabcec6c5
loop 0x4107a0
add eax, 0x12a63
xor ebx, ebx
add ebx, eax
add eax, 0x7748bf96
add eax, 0x88b7406f
mov ecx, 0x400000
add ecx, dword [ebp - 0x48]
call ebx
leave
ret
Function at 0x4014b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push eax
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.ucrtbase.dll_strlen]
add esp, 4
test eax, eax
je 0x401502
mov esi, eax
xor eax, eax
cmp byte [esi + edi - 1], 0xa
je 0x4014e1
mov eax, dword fs:[0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x24]
xchg dword [0x4030cc], eax
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push eax
push esi
push 1
push edi
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0x10
jmp 0x401504
xor eax, eax
add esp, 4
pop esi
pop edi
pop ebp
ret
Function at 0x401ce0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push 1
call sym.__configure_narrow_argv
add esp, 4
call sym.__initialize_narrow_environment
call sym.___p___argc
mov edi, dword [eax]
call sym.___p___argv
mov ebx, dword [eax]
call sym.__get_initial_narrow_environment
mov esi, eax
call sym._get_nt_header
xor ecx, ecx
cmp word [eax + 0x5c], 2
sete cl
inc ecx
push ecx
call sym.__set_app_type
add esp, 4
push esi
push ebx
push edi
call sym._main
add esp, 0xc
push eax
call sym._exit
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x40466d
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4ac670]
jne 0x404677
repz ret
jmp fcn.0040917e

Function at 0x40c144
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00402fc2
and dword [ebp - 4], 0
cmp dword [0x4b1c14], 0
mov ebx, eax
jne 0x40c1f5
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40c2a6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x40c2a6
push eax
call fcn.00402f50
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x4b1c14], eax
call esi
push eax
call fcn.00402f50
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4b1c18], eax
call esi
push eax
call fcn.00402f50
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x4b1c1c], eax
call esi
push eax
call fcn.00402f50
pop ecx
mov dword [0x4b1c24], eax
test eax, eax
je 0x40c1f5
push 0x4a9858
push edi
call esi
push eax
call fcn.00402f50
pop ecx
mov dword [0x4b1c20], eax
mov eax, dword [0x4b1c20]
cmp eax, ebx
je 0x40c24d
cmp dword [0x4b1c24], ebx
je 0x40c24d
push eax
call fcn.00402fcb
push dword [0x4b1c24]
mov esi, eax
call fcn.00402fcb
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40c24d
test edi, edi
je 0x40c24d
call esi
test eax, eax
je 0x40c244
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40c244
test byte [ebp - 0xc], 1
jne 0x40c24d
or dword [ebp + 0x10], 0x200000
jmp 0x40c286
mov eax, dword [0x4b1c18]
cmp eax, ebx
je 0x40c286
push eax
call fcn.00402fcb
pop ecx
test eax, eax
je 0x40c286
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40c286
mov eax, dword [0x4b1c1c]
cmp eax, ebx
je 0x40c286
push eax
call fcn.00402fcb
pop ecx
test eax, eax
je 0x40c286
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4b1c14]
call fcn.00402fcb
pop ecx
test eax, eax
je 0x40c2a6
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40c2a8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406bfa
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
push 0x4098b8
mov ebx, 0x45b2d8
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edi, dword [esp + 0x1c]
xor ebp, ebp
mov esi, 0x400
cmp edi, ebp
je 0x406c48
push 1
push ebp
push edi
call fcn.00405fb0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
cmp eax, ebp
je 0x406dc3
cmp eax, esi
jg 0x406dc3
invalid
push esi
mov edi, 0x460930
push edi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]

Function at 0x406c47
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
add byte [esi - 0x41], dl
xor byte [ecx], cl
inc esi
add byte [edi - 1], dl
je 0x406c76
and bh, bh
adc eax, sym.imp.KERNEL32.dll_GetShortPathNameW
cmp eax, ebp
je 0x406dc3
cmp eax, esi
jg 0x406dc3
push ebp
push ebp
push esi
push 0x45bad8
push 0xffffffffffffffff
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebp
push ebp
call ebx
dec eax
add dword [eax], 0xd3ff5555
test eax, eax
je 0x406dc3
push ebp
push ebp
push esi
mov esi, 0x45c128
push esi
push 0xffffffffffffffff
push edi
push ebp
push ebp
call ebx
test eax, eax
je 0x406dc3
push esi
push 0x45bad8
push str._s_s_r_n
push 0x45c528
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
mov eax, dword [0x472ddc]
push dword [eax + 0x128]
push edi
call fcn.00406966
push 4
push 0xc0000000
push edi
call fcn.00405fb0
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
je 0x406dc3
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebp
je 0x406db9
push ebp
lea eax, [esp + 0x14]
push eax
push edi
push esi
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406db9
cmp edi, dword [esp + 0x10]
jne 0x406db9
push str._Rename__r_n
push esi
call fcn.00405f16
cmp eax, ebp
jne 0x406d4c
push str._Rename__r_n
lea eax, [esi + edi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x406d81
push 0x4098ac
add eax, 0xa
push eax
call fcn.00405f16
mov ebp, eax
test ebp, ebp
je 0x406d7f
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
cmp ecx, ebp
jbe 0x406d76
sub eax, ecx
mov dl, byte [ecx]
mov byte [eax + ecx], dl
dec ecx
cmp ecx, ebp
ja 0x406d6c
sub ebp, esi
lea eax, [ebp + 1]
xor ebp, ebp
jmp 0x406d83
xor ebp, ebp
mov eax, edi
push ebx
push 0x45c528
add eax, esi
push eax
call fcn.00405f6c
push ebp
push ebp
push ebp
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
lea eax, [esp + 0x14]
push eax
add edi, ebx
push edi
push esi
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x876de8
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push 0
push 0
mov dword [esp + 0xc], 0
push dword [esi]
call fcn.0087fbd1
push dword [esi]
lea eax, [esp + 0x1c]
push 2
push 1
push eax
call fcn.0087f7e6
mov ax, word [esp + 0x28]
add esp, 0x1c
cmp al, 0x4d
jne 0x876eba
cmp ah, 0x5a
jne 0x876eba
push 0
push 0x3c
push dword [esi]
call fcn.0087fbd1
push dword [esi]
lea eax, [esp + 0x14]
push 1
push 4
push eax
call fcn.0087f7e6
mov eax, dword [esp + 0x20]
push 0
add eax, 0x18
push eax
push dword [esi]
call fcn.0087fbd1
push dword [esi]
lea eax, [esp + 0x38]
push 1
push 2
push eax
call fcn.0087f7e6
mov ax, word [esp + 0x44]
add esp, 0x38
cmp al, 0xb
jne 0x876eba
cmp ah, 1
jne 0x876e7e
mov ecx, 0x98
jmp 0x876e88
cmp ah, 2
jne 0x876eba
mov ecx, 0xa8
mov eax, dword [esp + 4]
push 0
add eax, ecx
push eax
push dword [esi]
call fcn.0087fbd1
push dword [esi]
lea eax, [esp + 0x14]
push 1
push 4
push eax
call fcn.0087f7e6
mov eax, dword [esp + 0x20]
add esp, 0x1c
or ecx, 0xffffffff
test eax, eax
cmove eax, ecx
pop esi
pop ecx
ret
or eax, 0xffffffff
pop esi
pop ecx
ret

Function at 0x876ee8
Capabilities:
Read file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
cmp dword [edi], 0
jne 0x876f1a
lea eax, [edi + 0x68]
push 0x420200
push eax
call fcn.008784e8
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x876f1a
push 0x420270
call fcn.00877738
add esp, 4
xor eax, eax
pop edi
ret
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push 0
push dword [ebp + 4]
call fcn.0087d2c2
add eax, dword [edi + 4]
push eax
push dword [edi]
call fcn.0087fbd1
add esp, 0xc
push dword [ebp + 8]
call fcn.0087d2c2
push eax
call fcn.0087f4c3
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x876f62
push 0x42028c
call fcn.00877738
add esp, 4
xor eax, eax
pop ebp
pop ebx
pop edi
ret
push dword [edi]
push 1
push dword [ebp + 8]
call fcn.0087d2c2
push eax
push ebx
call fcn.0087f7e6
add esp, 0x10
cmp eax, 1
jae 0x876f96
push 0x4202ac
call fcn.00877738
push ebx
call fcn.0087f4be
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
ret
cmp byte [ebp + 0x10], 1
jne 0x876fcd
push esi
push ebp
push ebx
call fcn.00876cf8
push ebx
mov esi, eax
call fcn.0087f4be
add esp, 0xc
mov ebx, esi
test esi, esi
pop esi
jne 0x876fcd
lea eax, [ebp + 0x12]
push eax
push 0x4202c8
call fcn.00877738
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
ret
mov eax, dword [edi]
test eax, eax
je 0x876fe2
push eax
call fcn.0087f544
add esp, 4
mov dword [edi], 0
pop ebp
mov eax, ebx
pop ebx
pop edi
ret