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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x416ff9
push eax
mov dword fs:[0], esp
sub esp, 0xd4
push ebp
push esi
call fcn.00404040
mov ebp, dword [esp + 0xec]
cmp ebp, eax
jae 0x405091
push ebp
call fcn.004046e0
mov esi, dword [esp + 0xf4]
add esp, 4
cmp esi, eax
jb 0x4050aa
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0xd4]
mov dword fs:[0], ecx
add esp, 0xe0
ret
push edi
xor edi, edi
push edi
push 0x418424
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], edi
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], edi
mov byte [esp + 0x20], 0
call fcn.00401560
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0xec], edi
call fcn.00404640
mov ecx, dword [esp + 0x2c]
add esp, 4
push edi
push 0x418424
push ecx
push edi
lea ecx, [esp + 0x24]
call fcn.004041c0
test eax, eax
jne 0x40512c
cmp dword [esp + 0x2c], 0x10
jb 0x405112
mov edx, dword [esp + 0x18]
push edx
call fcn.0040c618
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0xd4]
mov dword fs:[0], ecx
add esp, 0xe0
ret
push ebx
mov ebx, 0x10
xor eax, eax
mov ecx, ebx
lea edi, [esp + 0xa4]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x88]
push esi
push eax
call fcn.0040aa00
push eax
lea ecx, [esp + 0x5c]
push str.weight
push ecx
mov byte [esp + 0x100], 1
call fcn.004016f0
mov esi, eax
lea edx, [esp + 0x80]
push ebp
push edx
mov byte [esp + 0x108], 2
call fcn.0040aa00
push eax
lea eax, [esp + 0x54]
push str.FlashGroup
push eax
mov byte [esp + 0x114], 3
call fcn.004016f0
mov ecx, dword [esp + 0x58]
add esp, 0x28
cmp ecx, ebx
mov ecx, dword [esp + 0x1c]
jae 0x4051a8
lea ecx, [esp + 0x1c]
cmp dword [esi + 0x18], ebx
jb 0x4051b2
mov esi, dword [esi + 4]
jmp 0x4051b5
add esi, 4
cmp dword [eax + 0x18], ebx
jb 0x4051bf
mov eax, dword [eax + 4]
jmp 0x4051c2
add eax, 4
push ecx
push 0x40
lea ecx, [esp + 0xac]
push ecx
xor edi, edi
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
mov eax, dword [esp + 0x4c]
setne byte [esp + 0x13]
cmp eax, ebx
jb 0x4051f4
mov edx, dword [esp + 0x38]
push edx
call fcn.0040c618
add esp, 4
cmp dword [esp + 0x84], ebx
mov esi, 0xf
mov dword [esp + 0x4c], esi
mov dword [esp + 0x48], edi
mov byte [esp + 0x38], 0
jb 0x40521c
mov eax, dword [esp + 0x70]
push eax
call fcn.0040c618
add esp, 4
cmp dword [esp + 0x68], ebx
mov dword [esp + 0x84], esi
mov dword [esp + 0x80], edi
mov byte [esp + 0x70], 0
jb 0x405242
mov ecx, dword [esp + 0x54]
push ecx
call fcn.0040c618
add esp, 4
cmp dword [esp + 0xa0], ebx
mov dword [esp + 0x68], esi
mov dword [esp + 0x64], edi
mov byte [esp + 0x54], 0
jb 0x405268
mov edx, dword [esp + 0x8c]
push edx
call fcn.0040c618
add esp, 4
mov al, byte [esp + 0x13]
test al, al
je 0x405284
lea eax, [esp + 0xa4]
push eax
call fcn.0040caf6
add esp, 4
mov esi, eax
jmp 0x405288
mov esi, dword [esp + 0x14]
cmp dword [esp + 0x30], ebx
pop ebx
jb 0x40529c
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0040c618
add esp, 4
mov ecx, dword [esp + 0xe0]
pop edi
mov eax, esi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0xe0
ret
Function at 0x4052c0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41703c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x198
push ebx
push esi
push edi
call fcn.00404040
mov ebx, dword [ebp + 8]
cmp ebx, eax
jae 0x405363
push ebx
call fcn.004046e0
mov esi, dword [ebp + 0xc]
add esp, 4
cmp esi, eax
jae 0x405363
xor edi, edi
push edi
push 0x418424
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], edi
mov byte [esp + 0x18], 0
call fcn.00401560
lea eax, [esp + 0xc]
push eax
mov dword [esp + 0x1b0], edi
call fcn.00404640
mov ecx, dword [esp + 0x24]
add esp, 4
push edi
push 0x418424
push ecx
push edi
lea ecx, [esp + 0x1c]
call fcn.004041c0
test eax, eax
jne 0x40537a
cmp dword [esp + 0x24], 0x10
jb 0x405363
mov edx, dword [esp + 0x10]
push edx
call fcn.0040c618
add esp, 4
xor al, al
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x98]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x7c]
push esi
push eax
call fcn.0040aa00
push eax
lea ecx, [esp + 0x50]
push 0x41895c
push ecx
mov byte [esp + 0x1c0], 1
call fcn.004016f0
mov esi, eax
lea edx, [esp + 0x3c]
push ebx
push edx
mov byte [esp + 0x1c8], 2
call fcn.0040aa00
push eax
lea eax, [esp + 0x80]
push str.FlashGroup
push eax
mov byte [esp + 0x1d4], 3
call fcn.004016f0
mov edx, dword [esp + 0x4c]
mov ecx, 0x10
add esp, 0x28
cmp edx, ecx
mov edx, dword [esp + 0x10]
jae 0x4053f5
lea edx, [esp + 0x10]
cmp dword [esi + 0x18], ecx
jb 0x4053ff
mov esi, dword [esi + 4]
jmp 0x405402
add esi, 4
cmp dword [eax + 0x18], ecx
jb 0x40540c
mov eax, dword [eax + 4]
jmp 0x40540f
add eax, 4
push edx
push 0x104
lea ecx, [esp + 0xa0]
push ecx
xor edi, edi
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
mov eax, dword [esp + 0x78]
setne bl
cmp eax, 0x10
jb 0x405443
mov edx, dword [esp + 0x64]
push edx
call fcn.0040c618
add esp, 4
cmp dword [esp + 0x40], 0x10
mov esi, 0xf
mov dword [esp + 0x78], esi
mov dword [esp + 0x74], edi
mov byte [esp + 0x64], 0
jb 0x405469
mov eax, dword [esp + 0x2c]
push eax
call fcn.0040c618
add esp, 4
cmp dword [esp + 0x5c], 0x10
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], edi
mov byte [esp + 0x2c], 0
jb 0x40548a
mov ecx, dword [esp + 0x48]
push ecx
call fcn.0040c618
add esp, 4
cmp dword [esp + 0x94], 0x10
mov dword [esp + 0x5c], esi
mov dword [esp + 0x58], edi
mov byte [esp + 0x48], 0
mov byte [esp + 0x1ac], 0
jb 0x4054b9
mov edx, dword [esp + 0x80]
push edx
call fcn.0040c618
add esp, 4
test bl, bl
je 0x4054e1
lea eax, [esp + 0x98]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4054c7
mov ecx, dword [ebp + 0x10]
sub eax, edx
push eax
lea eax, [esp + 0x9c]
push eax
call fcn.00401560
cmp dword [esp + 0x24], 0x10
jb 0x4054f5
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040c618
add esp, 4
mov ecx, dword [esp + 0x1a4]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40aaf0
Capabilities:
Set registry value

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0x10]
cmp dword [ebx + 0x18], 0x10
push ebp
push esi
push edi
lea esi, [ebx + 4]
jb 0x40ab06
mov eax, dword [esi]
jmp 0x40ab08
mov eax, esi
mov edi, dword [esp + 0x18]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0x1c]
push ecx
push 2
push 0
push eax
push edi
call ebp
test eax, eax
jne 0x40ab70
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x18], 0x10
jb 0x40ab32
mov eax, dword [eax + 4]
jmp 0x40ab35
add eax, 4
mov edx, dword [esp + 0x24]
push 4
push edx
push 4
push 0
push eax
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x40ab61
mov ecx, dword [esp + 0x1c]
push ecx
call esi
test eax, eax
je 0x40abda
mov edx, dword [esp + 0x1c]
push edx
call esi
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret
cmp eax, 2
jne 0x40abe9
push ebx
push edi
call fcn.0040aaa0
add esp, 8
test al, al
je 0x40abe9
cmp dword [ebx + 0x18], 0x10
jb 0x40ab8b
mov esi, dword [esi]
lea eax, [esp + 0x10]
push eax
push 2
push 0
push esi
push edi
call ebp
test eax, eax
jne 0x40abe9
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x18], 0x10
jb 0x40abab
mov eax, dword [eax + 4]
jmp 0x40abae
add eax, 4
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
push 4
push ecx
push 4
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x40abe2
mov eax, dword [esp + 0x10]
push eax
call esi
test eax, eax
jne 0x40abe2
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x10]
push ecx
call esi
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret

Function at 0x40ac00
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
mov eax, 4
mov dword [esp], eax
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x18]
push esi
mov esi, 0x10
cmp ecx, esi
jb 0x40ac25
mov eax, dword [eax + 4]
jmp 0x40ac28
add eax, 4
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40ac95
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x18], esi
jb 0x40ac52
mov eax, dword [eax + 4]
jmp 0x40ac55
add eax, 4
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 4]
push ecx
push edx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
push ecx
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x40ac8e
mov eax, dword [esp + 0x14]
push eax
call esi
test eax, eax
jne 0x40ac8e
mov al, 1
pop esi
add esp, 8
ret
mov ecx, dword [esp + 0x14]
push ecx
call esi
xor al, al
pop esi
add esp, 8
ret
Function at 0x40c289
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.0040c570
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40c324
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 [0x41e278]
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 0x40c324
cmp eax, 1
je 0x40c345
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 0x40c324
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40c2f1
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40c320
xor eax, eax
inc eax
jmp 0x40c364
cmp edi, eax
jae 0x40c328
xor eax, eax
jmp 0x40c364
cmp eax, esi
jae 0x40c32f
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 [0x41e278]
jmp 0x40c348
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 0x40d17b
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x41e2b8], esi
push edi
jne 0x40d19b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x41e2b4], esi
mov byte [0x41e2b0], al
jne 0x40d201
mov ecx, dword [0x41f9d4]
test ecx, ecx
je 0x40d1e2
mov eax, dword [0x41f9d0]
sub eax, 4
cmp eax, ecx
jmp 0x40d1db
mov eax, dword [eax]
test eax, eax
je 0x40d1cd
call eax
mov eax, dword [0x41f9d0]
sub eax, 4
cmp eax, dword [0x41f9d4]
mov dword [0x41f9d0], eax
jae 0x40d1c5
mov eax, 0x41d040
mov esi, 0x41d048
cmp eax, esi
mov edi, eax
jae 0x40d201
mov eax, dword [edi]
test eax, eax
je 0x40d1fa
call eax
add edi, 4
cmp edi, esi
jb 0x40d1f2
mov eax, 0x41d04c
mov esi, 0x41d054
cmp eax, esi
mov edi, eax
jae 0x40d220
mov eax, dword [edi]
test eax, eax
je 0x40d219
call eax
add edi, 4
cmp edi, esi
jb 0x40d211
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40d23a
push dword [ebp + 8]
mov dword [0x41e2b8], 1
call fcn.0040d0e1
pop ebp
ret
Function at 0x40d673
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x418dc8
call fcn.0040f500
mov edi, 0x94
mov eax, edi
call fcn.0040c570
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 [0x41e278], ecx
mov eax, dword [esi + 4]
mov dword [0x41e284], eax
mov edx, dword [esi + 8]
mov dword [0x41e288], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41e27c], esi
cmp ecx, 2
je 0x40d6d3
or esi, 0x8000
mov dword [0x41e27c], esi
shl eax, 8
add eax, edx
mov dword [0x41e280], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40d70e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40d70e
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40d726
cmp eax, 0x20b
je 0x40d713
mov dword [ebp - 0x1c], esi
jmp 0x40d73a
cmp dword [ecx + 0x84], 0xe
jbe 0x40d70e
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40d734
cmp dword [ecx + 0x74], 0xe
jbe 0x40d70e
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040f6c8
pop ecx
test eax, eax
jne 0x40d766
cmp dword [0x41e2c4], 1
jne 0x40d753
call fcn.0041275b
push 0x1c
call fcn.004125e4
push 0xff
call fcn.0040d0e1
pop ecx
pop ecx
call fcn.0041238e
mov dword [ebp - 4], esi
call fcn.00412d59
test eax, eax
jge 0x40d77f
push 0x1b
call fcn.0040d64e
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41f9c8], eax
call fcn.00412c37
mov dword [0x41e2bc], eax
call fcn.00412b95
test eax, eax
jge 0x40d7a5
push 8
call fcn.0040d64e
pop ecx
call fcn.00412962
test eax, eax
jge 0x40d7b6
push 9
call fcn.0040d64e
pop ecx
push 1
call fcn.0040d111
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40d7cc
push eax
call fcn.0040d64e
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00412905
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40d7ed
movzx eax, word [ebp - 0x40]
jmp 0x40d7f0
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00402290
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40d80e
push edi
call fcn.0040d23c
call fcn.0040d25e
jmp 0x40d840
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040f53b
ret
Function at 0x41023c
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 0x41026a
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 0x410271
cmp ebx, dword [eax + 4]
jae 0x410271
xor eax, eax
jmp 0x410461
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x410282
xor eax, eax
inc eax
jmp 0x410460
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x410298
cmp ecx, edx
jae 0x4103dd
cmp dword [eax + 4], 0
je 0x4102a1
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x410289
cmp dword [ebp + 8], 0
je 0x4102c3
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x4103dd
cmp eax, esi
jae 0x4103dd
mov eax, dword [0x41e2f0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4102e8
cmp dword [esi*4 + 0x41e2f8], edi
je 0x4103e1
inc esi
cmp esi, eax
jl 0x4102d6
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41045d
cmp dword [ebp - 8], 0x1000000
jne 0x41045d
test byte [ebp - 0xc], 0xcc
je 0x410366
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x41045d
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x41045d
cmp word [eax + 0x18], 0x10b
jne 0x41045d
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x41045d
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x410366
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x410366
test byte [ecx + 0x27], 0x80
jne 0x4103dd
push 1
push 0x41e338
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41027a
mov ecx, dword [0x41e2f0]
test ecx, ecx
mov edx, ecx
jle 0x41039a
lea eax, [ecx*4 + 0x41e2f4]
cmp dword [eax], edi
je 0x41039a
dec edx
sub eax, 4
test edx, edx
jg 0x41038e
test edx, edx
jne 0x4103cb
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4103a7
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4103bf
lea eax, [edx*4 + 0x41e2f8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4103ad
cmp ecx, 0x10
jge 0x4103cb
inc ecx
mov dword [0x41e2f0], ecx
push 0
push 0x41e338
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41027a
xor eax, eax
jmp 0x410460
test esi, esi
jle 0x41027a
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x41e338
call ebx
test eax, eax
jne 0x41027a
cmp dword [esi*4 + 0x41e2f8], edi
je 0x410437
mov eax, dword [0x41e2f0]
lea esi, [eax - 1]
test esi, esi
jl 0x410425
cmp dword [esi*4 + 0x41e2f8], edi
je 0x410421
dec esi
jns 0x410415
test esi, esi
jge 0x410435
cmp eax, 0x10
jge 0x410430
inc eax
mov dword [0x41e2f0], eax
lea esi, [eax - 1]
jmp 0x410437
je 0x41044f
xor ecx, ecx
test esi, esi
jl 0x41044f
lea eax, [ecx*4 + 0x41e2f8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x41043d
push 0
push 0x41e338
call ebx
jmp 0x41027a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x411ac8
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x41f644]
mov eax, dword [0x41d334]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x411c8e
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x41f660]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x411c8e
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x411b32
xor eax, eax
jmp 0x411ca2
test al, 0x20
je 0x411b43
push 2
push edi
push edi
push ecx
call fcn.00415285
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x411c18
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x411c5f
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x411ba5
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x411b96
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x411b78
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411be5
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x411bf1
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x411b6c
jmp 0x411bf3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x411c89
cmp dword [ebp + 0x3a4], edi
je 0x411c5f
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x411c51
mov dword [0x41e270], eax
jmp 0x411c95
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411c43
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x411bf3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x411bf3
push dword [ebp + 0x3a4]
call fcn.00412585
pop ecx
jmp 0x411c9f
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x411c77
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x411b2b
mov dword [0x41e26c], 0x1c
mov dword [0x41e270], edi
jmp 0x411c9f
sub eax, dword [ebp - 0x7c]
jmp 0x411ca2
and dword [0x41e270], 0
mov dword [0x41e26c], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040e2b8
add ebp, 0x39c
leave
ret
Function at 0x411cb8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x41f644]
push edi
jae 0x411e8d
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x41f660]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x411e8d
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x411d63
test dl, 2
jne 0x411d63
test dl, 0x48
je 0x411d2d
cmp byte [eax + 5], 0xa
je 0x411d2d
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x411d76
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x411d5e
mov dword [0x41e270], ecx
jmp 0x411e94
cmp eax, 0x6d
jne 0x411d6a
xor eax, eax
jmp 0x411ea1
push eax
call fcn.00412585
pop ecx
jmp 0x411e9e
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x411e88
test eax, eax
je 0x411d9d
cmp byte [ebx], 0xa
jne 0x411d9d
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x411da6
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x411e82
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x411e72
cmp al, 0xd
je 0x411dd8
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x411e64
dec ecx
cmp dword [ebp - 8], ecx
jae 0x411df2
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x411ded
add dword [ebp - 8], 2
jmp 0x411e46
mov dword [ebp - 8], eax
jmp 0x411e60
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
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 0x411e1a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x411e60
cmp dword [ebp - 0x10], 0
je 0x411e60
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x411e3b
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x411e46
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x411e63
cmp ebx, dword [ebp + 0xc]
jne 0x411e4b
cmp byte [ebp - 1], 0xa
jne 0x411e4b
mov byte [ebx], 0xa
jmp 0x411e63
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00411ea6
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x411e64
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x411dbc
jmp 0x411e82
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x411e82
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x411ea1
and dword [0x41e270], 0
mov dword [0x41e26c], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret