joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40b090
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [0x4285e0]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor eax, ebp
push esi
mov dword [esp + 0x120], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40b0c9
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push eax
push esi
call ebx
test eax, eax
je 0x40b0e0
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, ebp
call fcn.00410a75
mov esp, ebp
pop ebp
ret
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x40
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
stosb byte es:[edi], al
lea eax, [esp + 0x14]
push esi
push eax
call fcn.00410920
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
test eax, eax
je 0x40b128
lea edx, [esp + 0x10]
push edx
call fcn.0040b090
add esp, 4
test al, al
jne 0x40b13f
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, ebp
call fcn.00410a75
mov esp, ebp
pop ebp
ret
push 0
push esi
call ebx
mov ecx, dword [esp + 0x11c]
dec eax
neg eax
pop edi
sbb eax, eax
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.00410a75
mov esp, ebp
pop ebp
ret

Function at 0x40b300
Capabilities:
Hash data with crc32

Disassembly:
mov al, byte [esp + 4]
mov cl, 0xd
imul cl
add al, 0x2f
movzx edx, al
xor eax, eax
mov al, byte [edx + 0x4281d0]
xor eax, 0xce
ret
Function at 0x40bac0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push edi
mov edi, dword [esp + 8]
test edi, edi
jne 0x40bacd
xor al, al
pop edi
ret
mov edx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
xor ecx, ecx
test esi, esi
mov dword [edx], 0xffffffff
jbe 0x40bb09
push ebx
push ebp
mov eax, dword [edx]
movzx ebx, byte [ecx + edi]
mov ebp, eax
and ebp, 0xff
xor ebx, ebp
mov ebp, dword [ebx*4 + 0x4281d0]
shr eax, 8
xor eax, ebp
inc ecx
cmp ecx, esi
mov dword [edx], eax
jb 0x40bae4
pop ebp
pop ebx
mov eax, dword [edx]
not eax
pop esi
mov dword [edx], eax
mov al, 1
pop edi
ret

Function at 0x40bb20
Capabilities:
Get file size
Hash data with crc32
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41fde0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1018
call fcn.00412aa0
mov eax, dword [0x4285e0]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x10], esp
push 0
push 0x8000027
push 3
push 0
xor eax, ebp
push 3
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
push 0x80000000
push eax
mov dword [ebp - 0x1028], edi
mov dword [edi], 0xffffffff
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40bbd2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr_d
push 4
call fcn.0040add0
add esp, 0xc
xor al, al
jmp 0x40bcd6
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov ebx, eax
lea eax, [ebp - 0x101c]
push eax
push 0x1000
lea ecx, [ebp - 0x1014]
push ecx
push esi
mov dword [ebp - 0x1024], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x101c]
mov ecx, edx
test eax, eax
mov dword [ebp - 0x1020], ecx
je 0x40bcc3
test edx, edx
je 0x40bcc3
mov al, byte [ebp + 0x10]
test al, al
mov byte [ebp - 0x1015], 0
je 0x40bc53
mov eax, ebx
sub eax, ecx
cmp eax, 4
ja 0x40bc53
cmp edx, 4
jbe 0x40bc42
mov eax, ecx
sub eax, ebx
add eax, 4
jmp 0x40bc44
mov eax, edx
sub edx, eax
mov dword [ebp - 0x101c], edx
mov byte [ebp - 0x1015], 1
xor ecx, ecx
cmp ecx, edx
jae 0x40bc84
mov eax, dword [edi]
movzx edi, byte [ebp + ecx - 0x1014]
mov ebx, eax
and ebx, 0xff
xor edi, ebx
mov ebx, dword [edi*4 + 0x4281d0]
mov edi, dword [ebp - 0x1028]
shr eax, 8
xor eax, ebx
mov dword [edi], eax
inc ecx
jmp 0x40bc55
mov al, byte [ebp - 0x1015]
test al, al
jne 0x40bcc3
push 0
lea ecx, [ebp - 0x101c]
push ecx
push 0x1000
lea edx, [ebp - 0x1014]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x101c]
mov ecx, dword [ebp - 0x1020]
mov ebx, dword [ebp - 0x1024]
add ecx, edx
jmp 0x40bc07
test esi, esi
je 0x40bcce
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi]
not eax
mov dword [edi], eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410a75
mov esp, ebp
pop ebp
ret
Function at 0x40bd40
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x40bd5f
push 0x421880
push 0xa
call fcn.0040add0
add esp, 8
xor al, al
pop esi
pop ecx
ret
mov cl, byte [esi + 0x20]
test cl, cl
je 0x40bd7a
push str.Const_Mode
push 3
call fcn.0040add0
add esp, 8
xor al, al
pop esi
pop ecx
ret
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40bda0
push str.point0
push 6
call fcn.0040add0
add esp, 8
xor al, al
pop esi
pop ecx
ret
mov edx, dword [esi + 0x24]
push 0
lea eax, [esp + 8]
push eax
push 0x28
lea ecx, [esi + 0x28]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40bdc7
cmp dword [esp + 4], 0x28
jne 0x40bdc7
mov al, 1
pop esi
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.0040add0
add esp, 0xc
xor al, al
pop esi
pop ecx
ret

Function at 0x40bdf0
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, ecx
mov ecx, dword [esp + 8]
cmp ecx, 0x8000
jae 0x40beb1
mov eax, dword [edi + 0x24]
test eax, eax
je 0x40beb1
mov dl, byte [edi + 0x20]
test dl, dl
je 0x40be2a
push str.Const_Mode
push 3
call fcn.0040add0
add esp, 8
xor al, al
pop edi
ret 4
push esi
lea esi, [ecx + ecx*2]
mov ecx, dword [edi + 0x34]
push 0
shl esi, 2
push 0
add ecx, esi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40be6a
mov edx, dword [edi + 0x34]
add edx, esi
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr_d__point_d
push 6
call fcn.0040add0
add esp, 0x10
pop esi
xor al, al
pop edi
ret 4
mov edx, dword [edi + 0x24]
push 0
lea eax, [esp + 0x10]
push eax
push 0xc
lea ecx, [esi + edi + 0x50]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40be94
cmp dword [esp + 0xc], 0xc
jne 0x40be94
pop esi
mov al, 1
pop edi
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.0040add0
add esp, 0xc
pop esi
xor al, al
pop edi
ret 4
push 0x421880
push 0xa
call fcn.0040add0
add esp, 8
xor al, al
pop edi
ret 4
Function at 0x40c140
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [0x4285e0]
xor eax, ebp
push ebx
push esi
mov dword [esp + 0x118], eax
mov eax, dword [ebp + 0x10]
test eax, eax
push edi
mov edi, ecx
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], eax
je 0x40c175
mov eax, dword [edi + 0x24]
test eax, eax
jne 0x40c189
push 0x421880
push 0xa
call fcn.0040add0
add esp, 8
jmp 0x40c267
mov cl, byte [edi + 0x20]
test cl, cl
je 0x40c1a4
push str.Const_Mode
push 3
call fcn.0040add0
add esp, 8
jmp 0x40c267
mov esi, dword [ebp + 8]
push 0
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40c1d4
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr_d__point_d
push 6
call fcn.0040add0
add esp, 0x10
jmp 0x40c267
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
cmp ebx, esi
jbe 0x40c1e0
mov ebx, esi
mov ecx, dword [esp + 0x14]
mov edx, dword [edi + 0x24]
push 0
lea eax, [esp + 0x14]
push eax
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c251
cmp dword [esp + 0x10], ebx
jne 0x40c251
cmp ebx, esi
jae 0x40c238
mov edx, dword [esp + 0xc]
xor eax, eax
push eax
mov ecx, 0x40
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
push eax
mov eax, dword [edx + 0x24]
sub esi, ebx
push esi
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c251
cmp esi, dword [esp + 0xc]
jne 0x40c251
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, ebp
call fcn.00410a75
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.0040add0
add esp, 0xc
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.00410a75
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40c950
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x60054]
test eax, eax
je 0x40ca37
mov ecx, dword [esi + 0x60058]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
mov ecx, dword [esp + 8]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jae 0x40ca37
mov eax, dword [esi + 0x24]
test eax, eax
je 0x40ca37
mov dl, byte [esi + 0x20]
test dl, dl
je 0x40c9ac
push str.Const_Mode
push 3
call fcn.0040add0
add esp, 8
xor al, al
pop esi
ret 4
push edi
lea edi, [ecx + ecx*2]
mov ecx, dword [esi + 0x38]
push 0
shl edi, 2
push 0
add ecx, edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40c9ec
mov edx, dword [esi + 0x38]
add edx, edi
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr_d__point_d
push 6
call fcn.0040add0
add esp, 0x10
pop edi
xor al, al
pop esi
ret 4
mov eax, dword [esi + 0x60054]
mov edx, dword [esi + 0x24]
push 0
lea ecx, [esp + 0x10]
push ecx
push 0xc
add eax, edi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ca1a
cmp dword [esp + 0xc], 0xc
jne 0x40ca1a
pop edi
mov al, 1
pop esi
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.0040add0
add esp, 0xc
pop edi
xor al, al
pop esi
ret 4
push 0x421880
push 0xa
call fcn.0040add0
add esp, 8
xor al, al
pop esi
ret 4
Function at 0x40f410
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
mov edx, dword [esp + 0xc]
push esi
mov esi, ecx
mov ecx, dword [esp + 0xc]
mov dword [esi + 8], ecx
mov cl, byte [esp + 0x18]
test cl, cl
mov dword [esi + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esi], 0x4220b0
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], 0xffffffff
mov dword [esi + 0x1c], 0
je 0x40f4cb
push eax
call fcn.00412b38
add esp, 4
test eax, eax
mov dword [esi + 0x1c], eax
je 0x40f4cb
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40f486
mov edx, dword [esi + 0xc]
push edx
push 0x4220a8
push 6
jmp 0x40f4ba
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
push 0
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esi + 8]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f4ac
mov edx, dword [esp + 0x18]
cmp edx, dword [esi + 0x14]
je 0x40f4cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinErr_d
push 4
call fcn.0040add0
mov eax, dword [esi + 0x1c]
push eax
call fcn.00412b33
add esp, 0x10
mov eax, esi
pop esi
ret 0x14

Function at 0x410460
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
mov cl, byte [esi]
test cl, cl
mov eax, 0x7fed7fed
mov edx, 0xeeeeeeee
je 0x4104a4
push ebx
push ebp
push edi
mov edi, dword [esp + 0x14]
shl edi, 8
nop
add eax, edx
imul edx, edx, 0x21
movsx ecx, cl
lea ebx, [edi + ecx]
mov ebp, dword [ebx*4 + 0x429d08]
inc esi
add edx, ecx
mov cl, byte [esi]
xor eax, ebp
test cl, cl
lea edx, [edx + eax + 3]
jne 0x410480
pop edi
pop ebp
pop ebx
pop esi
ret

Function at 0x411183
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x4111a0
call fcn.00412012
mov dword [eax], 0x16
xor eax, eax
jmp 0x41120a
push esi
push 0x8c
push 1
call fcn.00412150
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x4111f5
push esi
call fcn.00414f05
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x4111d3
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x4110ee
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x411209
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00411fa1
test ebx, ebx
pop ecx
je 0x411207
push ebx
call fcn.00412024
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x411dcc
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x422240
call fcn.0041364c
mov edi, 0x94
mov eax, edi
call fcn.00412aa0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x42ae84], ecx
mov eax, dword [esi + 4]
mov dword [0x42ae90], eax
mov edx, dword [esi + 8]
mov dword [0x42ae94], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x42ae88], esi
cmp ecx, 2
je 0x411e2c
or esi, 0x8000
mov dword [0x42ae88], esi
shl eax, 8
add eax, edx
mov dword [0x42ae8c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x411e67
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x411e67
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x411e7f
cmp eax, 0x20b
je 0x411e6c
mov dword [ebp - 0x1c], esi
jmp 0x411e93
cmp dword [ecx + 0x84], 0xe
jbe 0x411e67
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x411e8d
cmp dword [ecx + 0x74], 0xe
jbe 0x411e67
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00416d4b
pop ecx
test eax, eax
jne 0x411ea7
push 0x1c
call fcn.00411da8
pop ecx
call fcn.004150ff
test eax, eax
jne 0x411eb8
push 0x10
call fcn.00411da8
pop ecx
call fcn.00416ca9
mov dword [ebp - 4], esi
call fcn.00413bb4
test eax, eax
jge 0x411ed1
push 0x1b
call fcn.00411d83
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x42c624], eax
call fcn.00416b87
mov dword [0x42ad14], eax
call fcn.00416ae5
test eax, eax
jge 0x411ef7
push 8
call fcn.00411d83
pop ecx
call fcn.004168b2
test eax, eax
jge 0x411f08
push 9
call fcn.00411d83
pop ecx
push 1
call fcn.00415248
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x411f1e
push eax
call fcn.00411d83
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00416855
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x411f3f
movzx eax, word [ebp - 0x40]
jmp 0x411f42
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004020e0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x411f60
push edi
call fcn.00415375
call fcn.00415397
jmp 0x411f92
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00413687
ret
Function at 0x412351
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x4285e0]
xor ecx, ecx
xor eax, ebp
cmp dword [ebp + 0x3b4], ecx
push edi
mov edi, dword [ebp + 0x3b0]
mov dword [ebp + 0x3a0], eax
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], ecx
jne 0x41238d
xor eax, eax
jmp 0x4124f7
mov eax, dword [ebp + 0x3ac]
push ebx
mov ebx, dword [ebp + 0x3ac]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x42b500]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4123cb
push 2
push ecx
push ecx
push dword [ebp + 0x3ac]
call fcn.00417a7e
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x412465
cmp dword [ebp + 0x3b4], ecx
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x68], ecx
jbe 0x4124c8
jmp 0x4123ef
xor ecx, ecx
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x64]
cmp ecx, dword [ebp + 0x3b4]
jae 0x41242a
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x41241b
inc dword [ebp - 0x78]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x6c]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x6c]
cmp dword [ebp - 0x6c], 0x400
jl 0x4123fb
mov edi, eax
lea eax, [ebp - 0x64]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x412489
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x412492
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x7c]
cmp eax, dword [ebp + 0x3b4]
jb 0x4123ed
jmp 0x412492
push ecx
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b4]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x412489
mov eax, dword [ebp - 0x80]
and dword [ebp - 0x68], 0
mov dword [ebp - 0x74], eax
jmp 0x412492
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x74]
test eax, eax
jne 0x4124f2
cmp dword [ebp - 0x68], eax
je 0x4124c5
push 5
pop esi
cmp dword [ebp - 0x68], esi
jne 0x4124ba
call fcn.00412012
mov dword [eax], 9
call fcn.0041201b
mov dword [eax], esi
jmp 0x4124ed
push dword [ebp - 0x68]
call fcn.00412024
pop ecx
jmp 0x4124ed
mov edi, dword [ebp - 0x7c]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4124da
cmp byte [edi], 0x1a
jne 0x4124da
xor eax, eax
jmp 0x4124f5
call fcn.00412012
mov dword [eax], 0x1c
call fcn.0041201b
and dword [eax], 0
or eax, 0xffffffff
jmp 0x4124f5
sub eax, dword [ebp - 0x78]
pop esi
pop ebx
mov ecx, dword [ebp + 0x3a0]
xor ecx, ebp
pop edi
call fcn.00410a75
add ebp, 0x3a4
leave
ret
Function at 0x4126d7
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x4128ad
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x42b500]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4128ad
test cl, 0x48
je 0x412742
cmp byte [eax + 5], 0xa
je 0x412742
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x412794
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x41277c
call fcn.00412012
mov dword [eax], 9
call fcn.0041201b
mov dword [eax], esi
jmp 0x41278c
cmp eax, 0x6d
je 0x4128ad
push eax
call fcn.00412024
pop ecx
or eax, 0xffffffff
jmp 0x4128af
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x4128a8
test eax, eax
je 0x4127bb
cmp byte [ebx], 0xa
jne 0x4127bb
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x4127c4
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x4128a2
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x412892
cmp al, 0xd
je 0x4127f6
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x412884
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x412810
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x41280b
add dword [ebp + 0x10], 2
jmp 0x412864
mov dword [ebp + 0x10], eax
jmp 0x412880
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x412838
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x412880
cmp dword [ebp - 0xc], 0
je 0x412880
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x412859
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x412864
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x412883
cmp ebx, dword [ebp + 0xc]
jne 0x412869
cmp byte [ebp - 1], 0xa
jne 0x412869
mov byte [ebx], 0xa
jmp 0x412883
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00417a7e
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x412884
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x4127da
jmp 0x4128a2
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x4128a2
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x4128af
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4152b2
Capabilities:
Terminate process

Disassembly:
push 8
push 0x422648
call fcn.0041364c
push 8
call fcn.004161ce
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x42aec4], esi
jne 0x4152e6
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x42aec0], esi
mov al, byte [ebp + 0x10]
mov byte [0x42aebc], al
cmp dword [ebp + 0xc], edi
jne 0x415330
cmp dword [0x42b4ec], edi
je 0x415320
mov eax, dword [0x42b4e8]
sub eax, 4
mov dword [0x42b4e8], eax
cmp eax, dword [0x42b4ec]
jb 0x415320
mov eax, dword [eax]
cmp eax, edi
je 0x415301
call eax
jmp 0x415301
push 0x428030
mov eax, 0x428028
call fcn.00415230
pop ecx
push 0x42803c
mov eax, 0x428034
call fcn.00415230
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x415361
cmp dword [ebp + 0x10], edi
jne 0x41536f
mov dword [0x42aec4], esi
push dword [ebp + 8]
call fcn.004151ee
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x41536e
push 8
call fcn.00416119
pop ecx
ret
call fcn.00413687
ret

Function at 0x4166a4
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x4285e0]
mov ecx, dword [ebp + 0x98]
push ebx
xor eax, ebp
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x428df0]
je 0x4166db
inc eax
cmp eax, 0x13
jb 0x4166cc
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x428df0]
jne 0x4167fe
mov eax, dword [0x42ad1c]
cmp eax, 1
je 0x4167d9
cmp eax, edx
jne 0x41670b
cmp dword [0x428630], 1
je 0x4167d9
cmp ecx, 0xfc
je 0x4167fe
push 0x104
lea eax, [ebp - 0x7c]
push eax
push edx
mov byte [ebp + 0x88], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x416741
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.00415ef0
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00415ff0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x416775
mov eax, edi
push eax
call fcn.00415ff0
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x42234c
push edi
call fcn.00410920
add esp, 0x10
push edi
call fcn.00415ff0
push dword [esi + 0x428df4]
mov ebx, eax
call fcn.00415ff0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00412aa0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00415ef0
push edi
push ebx
call fcn.00415f00
push 0x422348
push ebx
call fcn.00415f00
push dword [esi + 0x428df4]
push ebx
call fcn.00415f00
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0041952d
add esp, 0x2c
jmp 0x4167fe
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x428df4]
push dword [esi]
call fcn.00415ff0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x8c]
xor ecx, ebp
call fcn.00410a75
add ebp, 0x90
leave
ret