joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100819c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
cmp esi, 0x104
mov dword [ebp - 8], edi
jb 0x1008316
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 0xc]
push eax
push 0x100811c
lea ebx, [ecx + 0x1088]
push 0x1008144
push ebx
mov dword [ebp + 0xc], edi
mov dword [ebp - 0xc], esi
call fcn.0101d16a
cmp dword [ebp + 0xc], edi
mov edi, dword [ebp + 8]
lea eax, [esi - 2]
je 0x100823c
push dword [ebp + 0xc]
push eax
push edi
call fcn.01008092
push dword [ebp + 0xc]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
jl 0x1008316
push edi
call fcn.01013b3d
cmp word [edi + eax*2 - 2], 0x5c
pop ecx
je 0x1008234
cmp esi, 0x7fffffff
ja 0x1008316
push 0x1008154
push esi
push edi
call fcn.010080d2
test eax, eax
jl 0x1008316
xor eax, eax
inc eax
jmp 0x1008318
push eax
push edi
push 0x1008158
push 0x100815c
push 0x1008184
push ebx
call fcn.0101d748
xor ebx, ebx
cmp word [edi], bx
je 0x100827f
push edi
call fcn.01013b3d
cmp word [edi + eax*2 - 2], 0x5c
pop ecx
je 0x1008234
cmp esi, 0x7fffffff
ja 0x1008316
push 0x1008194
jmp 0x1008308
lea eax, [ebp - 4]
push eax
push 5
push ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x10082d4
cmp dword [ebp - 4], ebx
je 0x10082d4
push edi
push dword [ebp - 4]
call fcn.0101f333
test eax, eax
jl 0x10082ac
mov dword [ebp - 8], 1
lea eax, [ebp + 8]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x10082cf
mov eax, dword [ebp + 8]
push dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp dword [ebp - 8], ebx
jne 0x10082df
push edi
push esi
call fcn.0101e0b9
test eax, eax
je 0x1008316
push edi
call fcn.01013b3d
cmp eax, 1
pop ecx
jl 0x1008234
cmp word [edi + eax*2 - 2], 0x5c
je 0x1008234
cmp esi, 0x7fffffff
ja 0x1008316
push 0x1008198
push esi
push edi
call fcn.010080d2
cmp eax, ebx
jmp 0x100822e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x1008eb2
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push 5
push dword [esp + 0xc]
mov esi, ecx
push 0
call fcn.0101def6
test eax, eax
je 0x1008ed7
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
pop esi
ret 4

Function at 0x1010c8a
Capabilities:
Hide graphical window

Disassembly:
push esi
push edi
push 0
push 0
push 0x130b
mov esi, ecx
push 0x3ed
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call fcn.0101ee70
mov edi, eax
test edi, edi
jl 0x1010cfc
cmp edi, 5
jg 0x1010cfc
mov eax, dword [esi + 0x14c]
test eax, eax
je 0x1010cc7
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
cmp dword [esi + 0x30], 0
je 0x1010cf7
push 0
push dword [esi + edi*4 + 0x164]
push dword [esi + 4]
push dword [esi + edi*4 + 0x150]
push dword [esi + 0xc]
call fcn.0101dc39
push 5
push eax
mov dword [esi + 0x14c], eax
call dword [sym.imp.USER32.dll_ShowWindow]
xor eax, eax
inc eax
jmp 0x1010cfe
xor eax, eax
pop edi
pop esi
ret
Function at 0x101275a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x14]
push edi
xor edi, edi
cmp eax, edi
je 0x101281b
mov ebx, dword [ebp + 8]
cmp ebx, edi
je 0x101281b
cmp dword [esi + 0x230], edi
je 0x10127c2
cmp dword [esi + 0x234], edi
je 0x10127b5
push edi
lea eax, [ebp + 8]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [esi]
mov dword [ebp - 4], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1012801
cmp dword [ebp + 8], 2
jne 0x1012801
mov dword [esi + 0x234], edi
push ebx
call fcn.01013b3d
mov edi, eax
pop ecx
shl edi, 1
jmp 0x10127e3
push edi
push edi
push dword [esi + 0xc]
push dword [esi + 8]
push 0xffffffffffffffff
push ebx
push 0x240
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, edi
je 0x1012806
mov ebx, dword [esi + 8]
lea edi, [eax - 1]
push 0
lea eax, [ebp + 8]
push eax
push edi
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1012801
cmp dword [ebp + 8], edi
jne 0x1012801
xor eax, eax
inc eax
jmp 0x1012825
push 0xfffffffffffffff8
pop eax
jmp 0x1012825
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x7a
neg eax
sbb eax, eax
and eax, 3
add eax, 0xfffffffc
jmp 0x1012825
neg eax
sbb eax, eax
and eax, 6
add eax, 0xfffffff9
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x10131cc
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
lea ecx, [ebp - 4]
call fcn.0101f6b5
lea ecx, [ebp - 4]
call fcn.0101f6b9
xor esi, esi
push esi
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jl 0x10132f1
call fcn.0101b0fc
push 0xbc6
push dword [ebp + 8]
call fcn.0101e438
lea ecx, [ebp - 0x18]
mov ebx, eax
call fcn.0100e798
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
cmp eax, esi
je 0x10132fd
mov cx, word [eax]
cmp cx, 0x22
push 2
pop edx
jne 0x1013243
add eax, edx
mov cx, word [eax]
cmp cx, si
je 0x101323b
cmp cx, 0x22
jne 0x101322b
cmp word [eax], 0x22
jne 0x101325b
jmp 0x1013259
cmp cx, 0x20
jbe 0x101325b
add eax, edx
cmp word [eax], 0x20
ja 0x1013249
jmp 0x101325b
cmp cx, 0x20
ja 0x1013263
add eax, edx
mov cx, word [eax]
cmp cx, si
jne 0x1013253
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 0x18]
push dword [ebp + 8]
call fcn.0100ecd6
test eax, eax
lea ecx, [ebp - 0x18]
jne 0x1013283
call fcn.0100e890
xor esi, esi
inc esi
jmp 0x10132f1
push edi
call fcn.0100e7aa
mov edi, eax
jmp 0x10132bd
lea eax, [ebp - 0x34]
push eax
push ebx
push edi
call fcn.0101ef43
test eax, eax
jne 0x10132bd
lea eax, [ebp - 0x34]
push eax
push edi
call fcn.0101e423
test eax, eax
jne 0x10132bd
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x34]
push eax
call fcn.0101de7a
push esi
push esi
lea eax, [ebp - 0x34]
push esi
push eax
call fcn.0101e1d7
test eax, eax
jne 0x101328d
lea ecx, [ebp - 0x18]
call fcn.0100eb9a
lea ecx, [ebp - 0x18]
call fcn.0100e890
call dword [sym.imp.ole32.dll_CoUninitialize]
call fcn.0101b104
lea ecx, [ebp - 4]
call fcn.0101f713
pop edi
lea ecx, [ebp - 4]
call fcn.0101f6b8
mov eax, esi
jmp 0x101330f
lea ecx, [ebp - 0x18]
call fcn.0100e890
lea ecx, [ebp - 4]
call fcn.0101f6b8
xor eax, eax
pop esi
pop ebx
leave
ret 0x10

Function at 0x101339b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1025ce0]
jne 0x10133a4
ret
jmp 0x10133a9
push ebp
lea ebp, [esp - 0x2a8]
sub esp, 0x328
mov eax, dword [0x1025ce0]
mov dword [ebp + 0x2a4], eax
mov eax, dword [0x1027750]
test eax, eax
je 0x10133cd
call eax
cmp dword [0x1027754], 0
je 0x1013414
push edi
xor eax, eax
and dword [ebp - 0x28], eax
push 0x13
pop ecx
lea edi, [ebp - 0x7c]
rep stosd dword es:[edi], eax
mov ecx, 0xb2
lea edi, [ebp - 0x24]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x80]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x28]
push 0
mov dword [ebp - 0x80], 0xc0000409
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [ebp - 0x30]
push eax
call dword [0x1027754]
pop edi
push 0x502
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp + 0x2a4]
call fcn.0101339b
add ebp, 0x2a8
leave
ret
Function at 0x10134de
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push 0x60
push 0x1001aa8
call fcn.0101501c
and dword [ebp - 4], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
or dword [ebp - 4], 0xffffffff
mov ebx, 0x94
push ebx
push 0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x1013695
mov dword [esi], ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push esi
push 0
test eax, eax
jne 0x101353b
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1013695
mov eax, dword [esi + 0x10]
mov dword [0x1026cdc], eax
mov eax, dword [esi + 4]
mov dword [0x1026ce8], eax
mov eax, dword [esi + 8]
mov dword [0x1026cec], eax
mov eax, dword [esi + 0xc]
and eax, 0x7fff
mov dword [0x1026ce0], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [0x1026cdc], 2
je 0x1013579
or byte [0x1026ce1], 0x80
mov eax, dword [0x1026ce8]
shl eax, 8
add eax, dword [0x1026cec]
mov dword [0x1026ce4], eax
call fcn.01013482
mov dword [ebp - 0x1c], eax
xor ebx, ebx
inc ebx
push ebx
call fcn.01014fcb
pop ecx
test eax, eax
jne 0x10135aa
push 0x1c
call fcn.0101345e
pop ecx
call fcn.01014ea9
test eax, eax
jne 0x10135bb
push 0x10
call fcn.0101345e
pop ecx
mov dword [ebp - 4], ebx
call fcn.01014aaa
test eax, eax
jge 0x10135cf
push 0x1b
call fcn.01013439
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x1028b14], eax
call fcn.01014984
mov dword [0x1026ccc], eax
call fcn.010148e3
test eax, eax
jge 0x10135f5
push 8
call fcn.01013439
pop ecx
call fcn.01014699
test eax, eax
jge 0x1013606
push 9
call fcn.01013439
pop ecx
call fcn.010141c6
mov dword [ebp - 0x28], eax
test eax, eax
je 0x1013619
push eax
call fcn.01013439
pop ecx
call fcn.01014630
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], bl
je 0x101362c
movzx eax, word [ebp - 0x40]
jmp 0x101362f
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push 0
push 0x1000000
call fcn.010131cc
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp dword [ebp - 0x1c], 0
jne 0x1013650
push esi
call fcn.010142db
call fcn.010142fd
jmp 0x1013682
or dword [ebp - 4], 0xffffffff
mov eax, esi
jmp 0x101369a
mov eax, 0xff
call fcn.01015057
ret
Function at 0x101431b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 8]
xor eax, eax
cmp ecx, dword [eax*8 + 0x1025cf0]
je 0x1014333
inc eax
cmp eax, 0x12
jb 0x1014324
push esi
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x1025cf0]
mov dword [ebp + 8], esi
jne 0x1014479
mov eax, dword [0x1026cd4]
cmp eax, 1
push ebx
je 0x1014449
test eax, eax
jne 0x1014368
cmp dword [0x1025ce8], 1
je 0x1014449
cmp ecx, 0xfc
je 0x1014478
push edi
push 6
pop ecx
mov esi, 0x1001e40
mov edi, 0x1026d20
rep movsd dword es:[edi], dword [esi]
push 0x104
mov ebx, 0x1026d3a
push ebx
movsw word es:[edi], word [esi]
push 0
mov byte [0x1026e3e], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10143b6
push 5
pop ecx
mov esi, 0x1001e28
mov edi, 0x1026d3a
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10143bb
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x10143ee
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10143cf
sub eax, edx
push 3
lea eax, [eax + 0x1026cff]
push 0x1001e24
push eax
call fcn.01017270
add esp, 0xc
mov edx, 0x1026d20
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10143f6
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1025cf4]
mov esi, 0x1001e20
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1014411
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x101441d
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x1001df8
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.01017176
add esp, 0xc
pop edi
jmp 0x1014478
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x1014478
mov esi, dword [esi + 0x1025cf4]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x1014460
push 0
sub ecx, edx
lea edx, [ebp - 4]
push edx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebx
pop esi
leave
ret
Function at 0x1016f3a
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.01013cc0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1016fd5
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 [0x1026cdc]
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 0x1016fd5
cmp eax, 1
je 0x1016ff6
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 0x1016fd5
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x1016fa2
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x1016fd1
xor eax, eax
inc eax
jmp 0x1017015
cmp edi, eax
jae 0x1016fd9
xor eax, eax
jmp 0x1017015
cmp eax, esi
jae 0x1016fe0
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 [0x1026cdc]
jmp 0x1016ff9
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 0x1017176
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x10272b8], ebx
push esi
push edi
jne 0x10171f6
push 0x10025e8
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x1017231
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10025dc
push edi
call esi
test eax, eax
mov dword [0x10272b8], eax
je 0x1017231
push 0x10025cc
push edi
call esi
push 0x10025b8
push edi
mov dword [0x10272bc], eax
call esi
cmp dword [0x1026cdc], 2
mov dword [0x10272c0], eax
jne 0x10171f6
push 0x100259c
push edi
call esi
test eax, eax
mov dword [0x10272c8], eax
je 0x10171f6
push 0x1002584
push edi
call esi
mov dword [0x10272c4], eax
mov eax, dword [0x10272c4]
test eax, eax
je 0x101723b
call eax
test eax, eax
je 0x1017222
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x10272c8]
test eax, eax
je 0x1017222
test byte [ebp - 8], 1
jne 0x101723b
cmp dword [0x1026ce8], 4
jb 0x1017235
or byte [ebp + 0x12], 0x20
jmp 0x101725a
xor eax, eax
jmp 0x101726a
or byte [ebp + 0x12], 4
jmp 0x101725a
mov eax, dword [0x10272bc]
test eax, eax
je 0x101725a
call eax
mov ebx, eax
test ebx, ebx
je 0x101725a
mov eax, dword [0x10272c0]
test eax, eax
je 0x101725a
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x10272b8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1018266
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 0x1018294
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 0x101829b
cmp ebx, dword [eax + 4]
jae 0x101829b
xor eax, eax
jmp 0x101848b
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x10182ac
xor eax, eax
inc eax
jmp 0x101848a
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x10182c2
cmp ecx, edx
jae 0x1018407
cmp dword [eax + 4], 0
je 0x10182cb
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x10182b3
cmp dword [ebp + 8], 0
je 0x10182ed
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x1018407
cmp eax, esi
jae 0x1018407
mov eax, dword [0x10272d8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x1018312
cmp dword [esi*4 + 0x10272e0], edi
je 0x101840b
inc esi
cmp esi, eax
jl 0x1018300
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1018487
cmp dword [ebp - 8], 0x1000000
jne 0x1018487
test byte [ebp - 0xc], 0xcc
je 0x1018390
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x1018487
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x1018487
cmp word [eax + 0x18], 0x10b
jne 0x1018487
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x1018487
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x1018390
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x1018390
test byte [ecx + 0x27], 0x80
jne 0x1018407
push 1
push 0x1027320
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x10182a4
mov ecx, dword [0x10272d8]
test ecx, ecx
mov edx, ecx
jle 0x10183c4
lea eax, [ecx*4 + 0x10272dc]
cmp dword [eax], edi
je 0x10183c4
dec edx
sub eax, 4
test edx, edx
jg 0x10183b8
test edx, edx
jne 0x10183f5
push 0xf
pop ebx
cmp ecx, ebx
jg 0x10183d1
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x10183e9
lea eax, [edx*4 + 0x10272e0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x10183d7
cmp ecx, 0x10
jge 0x10183f5
inc ecx
mov dword [0x10272d8], ecx
push 0
push 0x1027320
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x10182a4
xor eax, eax
jmp 0x101848a
test esi, esi
jle 0x10182a4
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x1027320
call ebx
test eax, eax
jne 0x10182a4
cmp dword [esi*4 + 0x10272e0], edi
je 0x1018461
mov eax, dword [0x10272d8]
lea esi, [eax - 1]
test esi, esi
jl 0x101844f
cmp dword [esi*4 + 0x10272e0], edi
je 0x101844b
dec esi
jns 0x101843f
test esi, esi
jge 0x101845f
cmp eax, 0x10
jge 0x101845a
inc eax
mov dword [0x10272d8], eax
lea esi, [eax - 1]
jmp 0x1018461
je 0x1018479
xor ecx, ecx
test esi, esi
jl 0x1018479
lea eax, [ecx*4 + 0x10272e0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x1018467
push 0
push 0x1027320
call ebx
jmp 0x10182a4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10185ae
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
jne 0x10185cc
xor eax, eax
jmp 0x101873a
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x1028a00]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x10185ff
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.0101a055
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x10186d1
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
jbe 0x1018709
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
mov dword [ebp - 8], edi
cmp ecx, dword [ebp + 0x10]
jae 0x101865a
mov edx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x101864b
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 8]
mov byte [eax], dl
inc eax
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x400
jl 0x101862e
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x18]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x101869a
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
cmp eax, edi
jl 0x10186a3
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x101861f
jmp 0x10186a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
xor edi, edi
mov eax, dword [ebp - 0x10]
cmp eax, edi
jne 0x1018735
cmp dword [ebp - 4], edi
je 0x1018709
push 5
pop esi
cmp dword [ebp - 4], esi
jne 0x10186fe
call fcn.01019aa5
mov dword [eax], 9
call fcn.01019ab8
mov dword [eax], esi
jmp 0x1018730
push edi
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10186f3
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
jmp 0x10186a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x10186a5
push dword [ebp - 4]
call fcn.01019acb
pop ecx
jmp 0x1018730
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x101871e
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x101871e
xor eax, eax
jmp 0x1018738
call fcn.01019aa5
mov dword [eax], 0x1c
call fcn.01019ab8
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x1018738
sub eax, dword [ebp - 0x14]
pop esi
pop ebx
pop edi
leave
ret
Function at 0x101aae1
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 0x101acb5
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x1028a00]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x101acb5
test cl, 0x48
je 0x101ab4c
cmp byte [eax + 5], 0xa
je 0x101ab4c
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 0x101ab9e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x101ab86
call fcn.01019aa5
mov dword [eax], 9
call fcn.01019ab8
mov dword [eax], esi
jmp 0x101ab96
cmp eax, 0x6d
je 0x101acb5
push eax
call fcn.01019acb
pop ecx
or eax, 0xffffffff
jmp 0x101acb7
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x101acb0
test eax, eax
je 0x101abc5
cmp byte [ebx], 0xa
jne 0x101abc5
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x101abce
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 0x101acaa
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x101ac9a
cmp al, 0xd
je 0x101ac00
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x101ac8c
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x101ac1a
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x101ac15
add dword [ebp + 0x10], 2
jmp 0x101ac6e
mov dword [ebp + 0x10], eax
jmp 0x101ac88
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 0x101ac42
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x101ac88
cmp dword [ebp - 0xc], 0
je 0x101ac88
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x101ac63
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x101ac6e
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x101ac8b
cmp ebx, dword [ebp + 0xc]
jne 0x101ac73
cmp byte [ebp - 1], 0xa
jne 0x101ac73
mov byte [ebx], 0xa
jmp 0x101ac8b
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0101848f
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x101ac8c
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x101abe4
jmp 0x101acaa
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x101acaa
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 0x101acb7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret