joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4037d0
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x42fd7b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x110
mov eax, dword [0x43f2a8]
push ebx
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push ebp
push esi
push edi
xor ebp, ebp
push ebp
push ebp
mov esi, ecx
mov dword [esp + 0x124], eax
mov eax, dword [esi + 0x2424]
push 0x147
push eax
call ebx
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x403822
mov dword [esp + 0x14], ebp
mov ecx, dword [esi + 0x2424]
push ebp
push ebp
push 0x14b
push ecx
call ebx
mov eax, dword [esi + 0x1ff8]
push eax
push ebp
push str.SegNumber
push str.Main
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov edi, eax
mov edx, edi
imul edx, edx, 0x108
push edx
mov dword [esp + 0x1c], edi
call fcn.0042310d
add esp, 4
mov dword [esi + 0xc4], eax
call fcn.00422453
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
cmp edi, ebp
mov dword [esp + 0x128], ebp
jbe 0x403992
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
xor edi, edi
push ebp
lea eax, [esp + 0x14]
push str.Seg_d
push eax
call fcn.00402e70
mov eax, dword [esi + 0x1ff8]
mov ecx, dword [esi + 0xc4]
mov edx, dword [esp + 0x1c]
add esp, 0xc
push eax
push 0xff
add ecx, edi
push ecx
push 0x431ca0
push edx
push str.Main
call ebx
mov eax, dword [esi + 0x1ff8]
mov ecx, dword [esi + 0xc4]
push eax
push 0xff
lea eax, [esp + 0x24]
push eax
push 0x431ca0
push str.StartAddr
add ecx, edi
push ecx
call ebx
push 0x10
lea edx, [esp + 0x20]
push 0
push edx
mov byte [esp + 0x29], 0x30
call fcn.00413978
mov ecx, dword [esi + 0xc4]
add esp, 0xc
mov dword [edi + ecx + 0x100], eax
mov eax, dword [esi + 0x1ff8]
push eax
mov eax, dword [esi + 0xc4]
push 0xff
lea edx, [esp + 0x24]
push edx
push 0x431ca0
push str.SegSize
add eax, edi
push eax
call ebx
push 0x10
lea ecx, [esp + 0x20]
push 0
push ecx
mov byte [esp + 0x29], 0x30
call fcn.00413978
mov edx, dword [esi + 0xc4]
mov dword [edi + edx + 0x104], eax
mov eax, dword [esi + 0xc4]
add esp, 0xc
add eax, edi
push eax
mov eax, dword [esi + 0x2424]
push 0
push 0x143
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x18]
inc ebp
add edi, 0x108
cmp ebp, eax
jb 0x403891
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x2424]
push 0
push ecx
push 0x14e
push edx
call ebx
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x128], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop edi
pop esi
pop ebp
pop ebx
jg 0x4039d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x110]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x10c]
call fcn.00412f7c
add esp, 0x11c
ret
Function at 0x404180
Capabilities:
Get file version info

Disassembly:
push 0xffffffffffffffff
push 0x42fddb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x118
mov eax, dword [0x43f2a8]
push ebx
push esi
xor esi, esi
push 0x431ca0
lea ecx, [esp + 0xc]
mov dword [esp + 0x120], eax
mov dword [esp + 0x10], esi
call fcn.004040d0
push 0x104
lea eax, [esp + 0x1c]
push eax
push esi
mov dword [esp + 0x134], esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov ebx, eax
cmp ebx, esi
je 0x404271
push edi
push ebx
push 2
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
mov eax, dword [esp + 0x18]
push edi
push ebx
push eax
lea ecx, [esp + 0x28]
push ecx
call sub.VERSION.dll_GetFileVersionInfoA
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
push 0x431674
push edi
call sub.VERSION.dll_VerQueryValueA
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x10]
mov edx, eax
and edx, 0xffff
push edx
shr eax, 0x10
push eax
mov eax, ecx
and eax, 0xffff
push eax
shr ecx, 0x10
push ecx
lea ecx, [esp + 0x1c]
push str.V_d._d_d_d
push ecx
call fcn.00402e70
add esp, 0x18
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
mov eax, dword [esp + 8]
add eax, 0xfffffff0
push eax
call fcn.00402200
mov esi, dword [esp + 0x134]
add eax, 0x10
mov dword [esi], eax
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
add esp, 4
mov dword [esp + 0x128], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4042b6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x120]
mov eax, esi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x118]
pop ebx
call fcn.00412f7c
add esp, 0x124
ret
Function at 0x409389
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x4093dc
call fcn.0042cf2e
mov edi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x4093dc
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x4093d2
xor eax, eax
jmp 0x4094f5
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x40940c
mov eax, dword [esi]
push edi
push dword [ebp - 4]
mov ecx, esi
push ebx
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x40940c
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x4094f2
mov ecx, dword [eax + 0x40]
and dword [ebp + 0xc], 0
test ecx, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 8], ecx
je 0x409439
lea ecx, [eax + 0x3c]
lea eax, [ebp + 8]
push eax
call fcn.00408f82
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [edi + 8], eax
mov dword [ebp - 4], eax
jbe 0x4094f2
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x409482
mov ecx, dword [ecx + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x409482
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 8], eax
je 0x40947c
mov ecx, dword [ebx + 0x48]
lea eax, [ebp + 8]
add ecx, 0x3c
push eax
call fcn.00408f82
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x4094e2
and dword [ebp + 0xc], 0
jmp 0x4094e2
mov ecx, dword [edi + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x4094e2
push 0xc
call fcn.004230e2
mov esi, eax
test esi, esi
pop ecx
je 0x4094c4
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x1c]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0x10]
mov dword [esi], eax
jmp 0x4094c6
xor esi, esi
mov ecx, dword [ebx + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x4094dd
push dword [ebp - 8]
call fcn.004212cf
jmp 0x4094e2
call fcn.004212a6
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [edi + 8]
mov dword [ebp - 4], eax
jb 0x409447
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x413ab9
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00412f90
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x413b54
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x442258]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x413b54
cmp eax, 1
je 0x413b75
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x413b54
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x413b21
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x413b50
xor eax, eax
inc eax
jmp 0x413b94
cmp edi, eax
jae 0x413b58
xor eax, eax
jmp 0x413b94
cmp eax, esi
jae 0x413b5f
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x442258]
jmp 0x413b78
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x414029
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x435be0
call fcn.004161dc
mov edi, 0x94
mov eax, edi
call fcn.00412f90
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 [0x442258], ecx
mov eax, dword [esi + 4]
mov dword [0x442264], eax
mov edx, dword [esi + 8]
mov dword [0x442268], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x44225c], esi
cmp ecx, 2
je 0x414089
or esi, 0x8000
mov dword [0x44225c], esi
shl eax, 8
add eax, edx
mov dword [0x442260], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4140c4
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4140c4
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4140dc
cmp eax, 0x20b
je 0x4140c9
mov dword [ebp - 0x1c], esi
jmp 0x4140f0
cmp dword [ecx + 0x84], 0xe
jbe 0x4140c4
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4140ea
cmp dword [ecx + 0x74], 0xe
jbe 0x4140c4
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00418746
pop ecx
test eax, eax
jne 0x414104
push 0x1c
call fcn.00414005
pop ecx
call fcn.004175d2
test eax, eax
jne 0x414115
push 0x10
call fcn.00414005
pop ecx
call fcn.0041a94a
mov dword [ebp - 4], esi
call fcn.0041a74c
test eax, eax
jge 0x41412e
push 0x1b
call fcn.00413fe0
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x443b30], eax
call fcn.0041a62a
mov dword [0x442248], eax
call fcn.0041a588
test eax, eax
jge 0x414154
push 8
call fcn.00413fe0
pop ecx
call fcn.0041a355
test eax, eax
jge 0x414165
push 9
call fcn.00413fe0
pop ecx
push 1
call fcn.00414305
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x41417b
push eax
call fcn.00413fe0
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0041a2f8
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x41419c
movzx eax, word [ebp - 0x40]
jmp 0x41419f
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0041fee0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4141bd
push edi
call fcn.00414432
call fcn.00414454
jmp 0x4141ef
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00416217
ret
Function at 0x41436f
Capabilities:
Terminate process

Disassembly:
push 8
push 0x435c08
call fcn.004161dc
push 8
call fcn.004188ea
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x442298], esi
jne 0x4143a3
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x442294], esi
mov al, byte [ebp + 0x10]
mov byte [0x442290], al
cmp dword [ebp + 0xc], edi
jne 0x4143ed
cmp dword [0x443b28], edi
je 0x4143dd
mov eax, dword [0x443b24]
sub eax, 4
mov dword [0x443b24], eax
cmp eax, dword [0x443b28]
jb 0x4143dd
mov eax, dword [eax]
cmp eax, edi
je 0x4143be
call eax
jmp 0x4143be
push 0x43e0ac
mov eax, 0x43e0a4
call fcn.004142ed
pop ecx
push 0x43e0b8
mov eax, 0x43e0b0
call fcn.004142ed
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x41441e
cmp dword [ebp + 0x10], edi
jne 0x41442c
mov dword [0x442298], esi
push dword [ebp + 8]
call fcn.004142ab
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x41442b
push 8
call fcn.00418835
pop ecx
ret
call fcn.00416217
ret
Function at 0x419459
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x419487
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x41948e
cmp ebx, dword [eax + 4]
jae 0x41948e
xor eax, eax
jmp 0x41967e
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x41949f
xor eax, eax
inc eax
jmp 0x41967d
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4194b5
cmp ecx, edx
jae 0x4195fa
cmp dword [eax + 4], 0
je 0x4194be
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4194a6
cmp dword [ebp + 8], 0
je 0x4194e0
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x4195fa
cmp eax, esi
jae 0x4195fa
mov eax, dword [0x442420]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x419505
cmp dword [esi*4 + 0x442428], edi
je 0x4195fe
inc esi
cmp esi, eax
jl 0x4194f3
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41967a
cmp dword [ebp - 8], 0x1000000
jne 0x41967a
test byte [ebp - 0xc], 0xcc
je 0x419583
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x41967a
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x41967a
cmp word [eax + 0x18], 0x10b
jne 0x41967a
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x41967a
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x419583
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x419583
test byte [ecx + 0x27], 0x80
jne 0x4195fa
push 1
push 0x442468
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x419497
mov ecx, dword [0x442420]
test ecx, ecx
mov edx, ecx
jle 0x4195b7
lea eax, [ecx*4 + 0x442424]
cmp dword [eax], edi
je 0x4195b7
dec edx
sub eax, 4
test edx, edx
jg 0x4195ab
test edx, edx
jne 0x4195e8
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4195c4
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4195dc
lea eax, [edx*4 + 0x442428]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4195ca
cmp ecx, 0x10
jge 0x4195e8
inc ecx
mov dword [0x442420], ecx
push 0
push 0x442468
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x419497
xor eax, eax
jmp 0x41967d
test esi, esi
jle 0x419497
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x442468
call ebx
test eax, eax
jne 0x419497
cmp dword [esi*4 + 0x442428], edi
je 0x419654
mov eax, dword [0x442420]
lea esi, [eax - 1]
test esi, esi
jl 0x419642
cmp dword [esi*4 + 0x442428], edi
je 0x41963e
dec esi
jns 0x419632
test esi, esi
jge 0x419652
cmp eax, 0x10
jge 0x41964d
inc eax
mov dword [0x442420], eax
lea esi, [eax - 1]
jmp 0x419654
je 0x41966c
xor ecx, ecx
test esi, esi
jl 0x41966c
lea eax, [ecx*4 + 0x442428]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x41965a
push 0
push 0x442468
call ebx
jmp 0x419497
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x419fe4
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x43f2a8]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x43f860]
je 0x41a019
inc eax
cmp eax, 0x13
jb 0x41a00a
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x43f860]
jne 0x41a13f
mov eax, dword [0x442250]
cmp eax, 1
je 0x41a117
cmp eax, edx
jne 0x41a049
cmp dword [0x43f2d8], 1
je 0x41a117
cmp ecx, 0xfc
je 0x41a13f
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41a07f
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0041b770
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00414820
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41a0b3
mov eax, edi
push eax
call fcn.00414820
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x432718
push edi
call fcn.00419ec0
add esp, 0x10
push edi
call fcn.00414820
push dword [esi + 0x43f864]
mov ebx, eax
call fcn.00414820
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00412f90
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0041b770
push edi
push ebx
call fcn.0041b780
push 0x435e88
push ebx
call fcn.0041b780
push dword [esi + 0x43f864]
push ebx
call fcn.0041b780
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0041d4f8
add esp, 0x2c
jmp 0x41a13f
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x43f864]
push dword [esi]
call fcn.00414820
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]
mov ecx, dword [ebp + 0x88]
call fcn.00412f7c
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x41be1e
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 0x41bff2
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4437c0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x41bff2
test cl, 0x48
je 0x41be89
cmp byte [eax + 5], 0xa
je 0x41be89
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 0x41bedb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x41bec3
call fcn.00415034
mov dword [eax], 9
call fcn.0041503d
mov dword [eax], esi
jmp 0x41bed3
cmp eax, 0x6d
je 0x41bff2
push eax
call fcn.00415046
pop ecx
or eax, 0xffffffff
jmp 0x41bff4
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x41bfed
test eax, eax
je 0x41bf02
cmp byte [ebx], 0xa
jne 0x41bf02
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x41bf0b
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 0x41bfe7
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x41bfd7
cmp al, 0xd
je 0x41bf3d
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x41bfc9
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x41bf57
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x41bf52
add dword [ebp + 0x10], 2
jmp 0x41bfab
mov dword [ebp + 0x10], eax
jmp 0x41bfc5
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 0x41bf7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41bfc5
cmp dword [ebp - 0xc], 0
je 0x41bfc5
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x41bfa0
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x41bfab
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x41bfc8
cmp ebx, dword [ebp + 0xc]
jne 0x41bfb0
cmp byte [ebp - 1], 0xa
jne 0x41bfb0
mov byte [ebx], 0xa
jmp 0x41bfc8
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041c3cf
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x41bfc9
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x41bf21
jmp 0x41bfe7
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x41bfe7
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 0x41bff4
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41c0a4
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x43f2a8]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x41c0d5
xor eax, eax
jmp 0x41c25e
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4437c0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x41c111
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0041e586
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x41c1ec
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x41c22a
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x41c175
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x41c166
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x41c146
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41c1b5
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x41c1be
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x41c137
jmp 0x41c1c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x41c259
cmp dword [ebp - 0x6c], edi
je 0x41c22a
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x41c21f
call fcn.00415034
mov dword [eax], 9
call fcn.0041503d
mov dword [eax], esi
jmp 0x41c254
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41c214
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x41c1c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x41c1c0
push dword [ebp - 0x6c]
call fcn.00415046
pop ecx
jmp 0x41c254
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x41c242
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x41c242
xor eax, eax
jmp 0x41c25c
call fcn.00415034
mov dword [eax], 0x1c
call fcn.0041503d
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x41c25c
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00412f7c
add ebp, 0x3a0
leave
ret