joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1002d2e0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi + 0x144], 0
jne 0x1002d308
cmp dword [esi + 0x150], 0
jne 0x1002d308
cmp dword [esi + 0x15c], 0
jne 0x1002d308
xor al, al
pop esi
pop ebp
ret 4
mov eax, dword [esi + 4]
and eax, 0x208
push edi
cmp eax, 0x208
jne 0x1002d334
cmp dword [esi + 0x114], 0
je 0x1002d334
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x32
call edi
cmp dword [esi + 0x114], 0
jne 0x1002d327
mov eax, dword [esi + 4]
shr eax, 1
mov byte [esi + 0x13c], 0
test al, 1
je 0x1002d34f
push 0
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetCommMask]
cmp dword [esi + 0x144], 0
mov eax, dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_TerminateThread]
je 0x1002d3ae
push dword [esi + 0x14c]
call eax
push dword [ebp + 8]
push dword [esi + 0x144]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1002d397
push 0
push dword [esi + 0x144]
call ebx
test eax, eax
je 0x1002d428
push dword [esi + 0x144]
call edi
mov eax, dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [esi + 0x144], 0
cmp dword [esi + 0x150], 0
je 0x1002d3f2
push dword [esi + 0x158]
call eax
push dword [ebp + 8]
push dword [esi + 0x150]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1002d3e0
push 0
push dword [esi + 0x150]
call ebx
test eax, eax
je 0x1002d428
push dword [esi + 0x150]
call edi
mov dword [esi + 0x150], 0
cmp dword [esi + 0x15c], 0
je 0x1002d443
push dword [esi + 0x164]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [ebp + 8]
push dword [esi + 0x15c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1002d431
push 0
push dword [esi + 0x15c]
call ebx
test eax, eax
jne 0x1002d431
pop ebx
pop edi
xor al, al
pop esi
pop ebp
ret 4
push dword [esi + 0x15c]
call edi
mov dword [esi + 0x15c], 0
pop ebx
pop edi
mov al, 1
pop esi
pop ebp
ret 4
Function at 0x1002da30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
mov eax, dword [0x100a2d20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx + 4]
lea esi, [ebx + 0x108]
shr eax, 1
test al, 1
je 0x1002dafe
test esi, esi
je 0x1002da71
lea edi, [esi + 0x14]
push edi
mov dword [ebp - 0x408], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x1002da7b
mov dword [ebp - 0x408], 0x14
cmp dword [ebx + 0x114], 0
jne 0x1002da88
xor edi, edi
jmp 0x1002dad9
mov ecx, dword [ebx + 0x10c]
test ecx, ecx
je 0x1002dab3
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
cmp eax, 0x400
jae 0x1002daa5
mov edi, dword [ecx + 4]
sub edi, dword [ecx]
jmp 0x1002dab5
mov eax, dword [ecx]
mov edi, 0x400
add eax, 0x10
add eax, ecx
jmp 0x1002dac4
xor edi, edi
test ecx, ecx
je 0x1002dac2
mov eax, dword [ecx]
add eax, 0x10
add eax, ecx
jmp 0x1002dac4
xor eax, eax
push edi
push eax
mov ecx, ebx
call fcn.1002cf80
push edi
push 0
mov ecx, esi
call fcn.1002d540
mov edi, eax
test esi, esi
je 0x1002dae9
push dword [ebp - 0x408]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret 4
lea edi, [ebx + 0x11c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x400
lea eax, [ebp - 0x404]
mov ecx, esi
push eax
call fcn.1002d540
mov esi, eax
push edi
mov dword [ebp - 0x410], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x1002dc03
xor edi, edi
mov eax, dword [ebx + 8]
sub esi, edi
cmp eax, 0xffffffff
je 0x1002dbf1
test esi, esi
je 0x1002dbf1
push 0
lea ecx, [ebp - 0x40c]
mov dword [ebp - 0x408], 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ClearCommError]
test eax, eax
je 0x1002db7f
cmp dword [ebp - 0x40c], 0
jbe 0x1002db7f
push 1
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 8]
shr eax, 1
test al, 1
je 0x1002dbc9
lea eax, [ebx + 0x188]
push eax
lea eax, [ebp - 0x408]
push eax
push esi
lea eax, [ebp - 0x404]
add eax, edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1002dbbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1002dbf1
add dword [ebx + 0x138], esi
mov eax, dword [ebp - 0x408]
jmp 0x1002dbf3
push 0
lea eax, [ebp - 0x408]
push eax
push esi
lea eax, [ebp - 0x404]
add eax, edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x408]
add dword [ebx + 0x138], eax
jmp 0x1002dbf3
xor eax, eax
mov esi, dword [ebp - 0x410]
add edi, eax
cmp edi, esi
jb 0x1002db37
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100699c7
mov esp, ebp
pop ebp
ret 4
Function at 0x10031f10
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x538
mov eax, dword [0x100a2d20]
xor eax, ebp
mov dword [ebp - 4], eax
movups xmm0, xmmword [str.C:UsbDeamon]
mov ax, word [0x1009666c]
mov word [ebp - 0x1c], ax
lea eax, [ebp - 0x34]
movups xmmword [ebp - 0x34], xmm0
push eax
movq xmm0, qword [0x10096664]
movq qword [ebp - 0x24], xmm0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x104
lea eax, [ebp - 0x138]
push 0
push eax
call fcn.1006d400
lea ecx, [ebp - 0x138]
call fcn.1003db40
push 0x400
lea eax, [ebp - 0x538]
push 0
push eax
call fcn.1006d400
add esp, 0x18
mov dword [ebp - 8], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x18]
movups xmmword [ebp - 0x18], xmm0
call fcn.1003b3d0
lea eax, [ebp - 0x138]
push eax
push 0xc4
push str.StartUsbEventMonitor
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x538]
push str._s_t__d__d___INFO____s:_d__StartUsbEventMonitor_with_path____s__n
push eax
call fcn.10007cc0
lea eax, [ebp - 0x538]
add esp, 0x20
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10031fe0
sub eax, edx
push eax
lea eax, [ebp - 0x538]
push eax
call fcn.1003b520
add esp, 8
call fcn.10031c70
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret 4
Function at 0x1003b490
Capabilities:
Create directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push esi
push edi
push 0x100973a0
push 0x1008ba50
mov edi, edx
call fcn.10044b69
mov esi, eax
add esp, 8
test esi, esi
je 0x1003b4d9
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003b4b7
push esi
sub ecx, edx
push 1
push ecx
push edi
call fcn.10049e29
push esi
call fcn.10044d38
add esp, 0x14
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edx, str.file__
mov ecx, 0x100a68a8
call fcn.100241a0
mov edx, 0x1008ba50
mov ecx, eax
call fcn.100241a0
mov edx, str.__not_exist__create_first_
mov ecx, eax
call fcn.100241a0
push eax
call fcn.10024440
add esp, 4
push str.C:logs
call fcn.1004b9cb
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x1003c940
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x100a2d20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
test edi, edi
je 0x1003cabc
test ebx, ebx
je 0x1003cabc
cmp edi, 0xffffffff
je 0x1003cb3a
push dword [ebp + 8]
call fcn.1003cf70
add esp, 4
cmp eax, 0xffffffff
je 0x1003cb3a
xor esi, esi
nop word [eax + eax]
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x200
lea eax, [ebp - 0x218]
mov dword [ebp - 0x41c], 0x200
push 0
push eax
call fcn.1006d400
add esp, 0xc
lea eax, [ebp - 0x41c]
push 0
push eax
push 0x200
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1003c9e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1003ca0d
mov eax, dword [ebp - 0x41c]
test eax, eax
je 0x1003c9fb
push eax
lea eax, [ebp - 0x218]
push eax
push ebx
call fcn.1006ce80
add esp, 0xc
push 0xf
push edi
call dword [sym.imp.KERNEL32.dll_PurgeComm]
cmp dword [ebp - 0x41c], 0
jg 0x1003ca2a
inc esi
cmp esi, 2
jl 0x1003c990
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret
push 0x400
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.1006d400
add esp, 0xc
mov dword [ebp - 8], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x18]
movups xmmword [ebp - 0x18], xmm0
call fcn.1003b3d0
push ebx
push 0x18d
push str.CommunicationStream100
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x418]
push str._s_t__d__d___INFO____s:_d__call__CommunicationStream100_Ok_return_recvStream___s_n
push eax
call fcn.10007cc0
lea ecx, [ebp - 0x418]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003ca90
sub ecx, edx
lea eax, [ebp - 0x418]
push ecx
push eax
call fcn.1003b520
add esp, 8
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret
push 0x400
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.1006d400
add esp, 0xc
mov dword [ebp - 8], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x18]
movups xmmword [ebp - 0x18], xmm0
call fcn.1003b3d0
push 0x182
push str.CommunicationStream100
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x418]
push str._s_t__d__d___ERROR____s:_d__handle_or_recvStream_is_NULL_n
push eax
call fcn.10007cc0
lea ecx, [ebp - 0x418]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003cb21
sub ecx, edx
lea eax, [ebp - 0x418]
push ecx
push eax
call fcn.1003b520
add esp, 8
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100699c7
mov esp, ebp
pop ebp
ret
Function at 0x1003ce50
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
mov eax, dword [0x100a2d20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov edi, dword [ebp + 0xc]
cmp esi, 0xffffffff
je 0x1003cead
test esi, esi
je 0x1003cead
test ebx, ebx
je 0x1003cead
lea eax, [ebp - 0x610]
push eax
lea eax, [ebp - 0x614]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ClearCommError]
push 0
lea eax, [ebp - 0x618]
push eax
push dword [ebp + 8]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1003cec0
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
test edi, edi
je 0x1003cf50
push 0x600
lea eax, [ebp - 0x604]
mov dword [ebp - 0x614], 0x600
push 0
push eax
call fcn.1006d400
add esp, 0xc
lea eax, [ebp - 0x614]
push 0
push eax
push 0x600
lea eax, [ebp - 0x604]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1003cf2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x614]
test eax, eax
je 0x1003cf47
push eax
lea eax, [ebp - 0x604]
push eax
push edi
call fcn.1006ce80
add esp, 0xc
push 0xf
push esi
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100699c7
mov esp, ebp
pop ebp
ret

Function at 0x1003db40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x100a2d20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x20c]
mov ebx, ecx
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea edx, [ebp - 0x20c]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x1003db73
sub edx, ecx
sar edx, 1
lea edi, [edx + 1]
cmp edi, 0x3fffffff
jg 0x1003dbc0
add edi, edi
mov eax, edi
call fcn.1006a8d0
mov esi, esp
test esi, esi
je 0x1003dbc0
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
lea eax, [ebp - 0x20c]
mov byte [esi], 0
push eax
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb edx, edx
and edx, esi
jmp 0x1003dbc2
xor edx, edx
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003dbc7
sub ecx, esi
push ecx
push edx
push 0x104
push ebx
call fcn.10043ab8
add esp, 0x10
lea esp, [ebp - 0x218]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret
Function at 0x1003e960
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
cmp dword [ecx + 0x38], 0
push ebx
push esi
push edi
mov dword [esp + 0xc], ecx
je 0x1003ea46
mov esi, dword [ebp + 0x10]
mov ebx, esi
mov edx, dword [ebp + 0xc]
mov edi, edx
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
test esi, esi
jl 0x1003ea35
jg 0x1003e9a0
test edx, edx
je 0x1003ea35
nop dword [eax]
call fcn.10024170
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x1003e9f4
jg 0x1003e9b7
test esi, esi
je 0x1003e9f4
cmp ebx, eax
jg 0x1003e9c7
jl 0x1003e9c1
cmp edi, esi
jae 0x1003e9c7
mov esi, edi
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
push esi
push eax
mov eax, dword [ecx + 0x20]
push dword [eax]
call fcn.1006ce80
mov ecx, dword [esp + 0x18]
add esp, 0xc
sub edi, esi
sbb ebx, dword [esp + 0x14]
mov eax, dword [ecx + 0x30]
sub dword [eax], esi
mov eax, dword [ecx + 0x20]
add dword [eax], esi
jmp 0x1003ea19
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov edx, dword [ecx]
movzx eax, byte [eax]
push eax
call dword [edx + 0xc]
cmp eax, 0xffffffff
je 0x1003ea2f
mov ecx, dword [esp + 0xc]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
add dword [esp + 0x10], esi
test ebx, ebx
jg 0x1003e9a0
jl 0x1003ea2f
test edi, edi
jne 0x1003e9a0
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
sub edx, edi
mov eax, edx
sbb esi, ebx
mov edx, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ecx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov edx, dword [eax]
lea eax, [ecx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
test edx, edx
je 0x1003ea6e
mov eax, dword [eax]
mov edx, dword [eax]
jmp 0x1003ea74
xor edx, edx
mov dword [esp + 0x18], eax
mov eax, edx
cdq
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
test edi, edi
jl 0x1003eadc
jg 0x1003ea89
test esi, esi
je 0x1003eadc
test edx, edx
jl 0x1003ead7
jg 0x1003ea93
test eax, eax
je 0x1003ead7
cmp edi, edx
jg 0x1003eaa7
jl 0x1003ea9d
cmp esi, eax
jae 0x1003eaa7
mov eax, esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov ebx, dword [ebp + 8]
push eax
push ebx
push dword [esp + 0x24]
call fcn.1006ce80
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x14]
add ebx, edx
mov ecx, dword [esp + 0xc]
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x10]
sub dword [eax], edx
mov eax, dword [ecx + 0x20]
add dword [eax], edx
jmp 0x1003eadf
mov ebx, dword [ebp + 8]
jmp 0x1003eae9
mov ebx, dword [ebp + 8]
test edi, edi
jl 0x1003eb02
jg 0x1003eae9
test esi, esi
je 0x1003eb02
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x1003eb02
push eax
push esi
push 1
push ebx
call fcn.10049e29
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x1003f130
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x100a2d20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x1003f160
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x1003f19c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x1003f19c
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x1003f282
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x1003f1c4
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x1003f1f7
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.1004bbad
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
mov edx, dword [ecx]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x1c]
sub eax, 0
je 0x1003f255
sub eax, 1
je 0x1003f255
sub eax, 2
jne 0x1003f282
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.1003cff0
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x1003f272
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.10049e29
add esp, 0x10
cmp edi, eax
jne 0x1003f282
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x1003f187
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100699c7
mov esp, ebp
pop ebp
ret 4
Function at 0x1003f820
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x100a2d20]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x1003f8da
cmp byte [esi + 0x3d], 0
je 0x1003f8da
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x1003f8c8
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
mov edx, dword [ecx]
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x20]
sub eax, 0
je 0x1003f890
sub eax, 1
je 0x1003f894
sub eax, 2
jne 0x1003f8c8
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x1003f8b1
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.10049e29
add esp, 0x10
cmp edi, eax
jne 0x1003f8c8
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100699c7
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.100699c7
mov esp, ebp
pop ebp
ret

Function at 0x10053663
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.100534d9

Function at 0x100639f8
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
xor eax, eax
mov dword [ebp - 8], ecx
inc eax
inc ebx
mov dword [ebp - 4], eax
cmp dword [edi + 8], ebx
jle 0x10063a6f
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x10063a35
mov eax, dword [ecx + 0x10]
cmp dword [eax + ebx*8 + 4], edx
je 0x10063a35
mov eax, dword [edi + 0xc]
cmp dword [eax + ebx*4], 0
je 0x10063a62
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x10063a65
mov eax, dword [edi + 0xc]
mov eax, dword [eax + ebx*4]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10063a5b
mov eax, dword [eax]
push 1
mov esi, dword [eax]
mov ecx, esi
call dword [0x1007d4ac]
mov ecx, dword [ebp - 0xc]
call esi
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [edi + 0xc]
and dword [eax + ebx*4], 0
mov eax, dword [ebp - 4]
inc ebx
cmp ebx, dword [edi + 8]
jl 0x10063a18
test eax, eax
je 0x10063ab6
lea esi, [ecx + 0x1c]
mov ebx, edi
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 8]
push edi
add ecx, 0x14
call fcn.10063ce7
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [edi]
push 1
mov esi, dword [eax]
mov ecx, esi
call dword [0x1007d4ac]
mov ecx, edi
call esi
mov eax, dword [ebp - 8]
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x10063d3a
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push 0x10
mov eax, 0x1007bd13
call fcn.1006adb7
mov ebx, ecx
mov dword [ebp - 0x18], ebx
lea eax, [ebx + 0x1c]
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebp + 8]
test edi, edi
jle 0x10063e31
cmp edi, dword [ebx + 0xc]
jge 0x10063e31
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x10063d91
cmp edi, dword [esi + 8]
jl 0x10063e1f
cmp dword [ebp + 0xc], 0
je 0x10063e1f
xor edi, edi
jmp 0x10063dc3
xor edi, edi
push 0x10
mov dword [ebp - 4], edi
call fcn.10063796
mov esi, eax
test esi, esi
je 0x10063dab
mov dword [esi], vtable.CThreadData.0
jmp 0x10063dad
mov esi, edi
or dword [ebp - 4], 0xffffffff
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x14]
mov dword [esi + eax], ecx
mov dword [ebx + 0x14], esi
push 4
push dword [ebx + 0xc]
call fcn.1005cd8d
cmp dword [esi + 0xc], 0
pop ecx
pop ecx
jne 0x10063ddf
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x10063deb
push 2
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
mov edx, eax
test edx, edx
je 0x10063e58
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], edx
mov eax, dword [ebx + 0xc]
sub eax, ecx
shl eax, 2
push eax
lea eax, [edx + ecx*4]
push edi
push eax
call fcn.1006d400
mov eax, dword [ebx + 0xc]
add esp, 0xc
mov dword [esi + 8], eax
push esi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov edi, dword [ebp + 8]
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x10063e31
cmp edi, dword [esi + 8]
jge 0x10063e31
mov eax, dword [ebp + 0xc]
mov dword [ecx + edi*4], eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.1006ad1c
ret 8
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.1005d220
int3

Function at 0x10079930
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1007995d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1007995d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret