joyce8/EMBER2024-capa huggingface dataset:
Function at 0x499216
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x840
push ebx
push ebp
push esi
push edi
push dword [0x5af480]
xor ebp, ebp
mov dword [esp + 0x14], ebp
call fcn.004bef0d
mov ebx, dword [esp + 0x854]
mov edi, eax
xor eax, eax
mov dword [esp + 0x20], edi
inc eax
cmp word [ebx + 0x20], ax
jne 0x499287
push ebp
push ebp
push dword [ebx]
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
cmp esi, 0xffffffff
je 0x4993e9
lea eax, [ebx + 0x28]
push 0x18
push eax
call fcn.004bf832
pop ecx
pop ecx
mov ecx, eax
xor eax, eax
inc eax
mov dword [esp + 0x10], eax
mov dword [ecx], eax
mov dword [ecx + 8], esi
mov dword [ecx + 0xc], ebx
mov eax, dword [ebx + 0x24]
mov dword [edi + 4], eax
mov dword [edi], ecx
jmp 0x4993e9
cmp word [ebx + 0x22], bp
je 0x4992ba
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x1c
push eax
lea eax, [esp + 0x38]
push eax
push ebp
push 0x800
lea eax, [esp + 0x60]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
mov dword [esp + 0x14], edi
jmp 0x4992e5
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x10
push eax
lea eax, [esp + 0x28]
push eax
push ebp
push 0x800
lea eax, [esp + 0x60]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
mov dword [esp + 0x14], eax
test edi, edi
jle 0x4993e9
mov esi, dword [ebx + 0x28]
mov dword [esp + 0x10], 2
jmp 0x499325
lea eax, [esi + 0xc]
cmp word [ebx + 0x22], bp
je 0x49930d
push dword [esp + 0x18]
lea ecx, [esp + 0x38]
jmp 0x499315
push dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
push eax
call fcn.0045d070
add esp, 0xc
test eax, eax
je 0x49932b
mov esi, dword [esi]
test esi, esi
jne 0x4992fa
jmp 0x499337
mov eax, esi
push 8
pop ecx
lea ebp, [eax + ecx]
test esi, esi
jne 0x49937a
lea eax, [ebx + 0x28]
push 0x40
push eax
call fcn.004bf832
mov ebp, eax
mov eax, dword [esp + 0x18]
pop ecx
pop ecx
mov dword [ebp], eax
lea edi, [ebp + 4]
mov dword [ebp + 0x24], ebx
mov al, byte [ebx + 0x22]
mov byte [ebp + 0x20], al
xor eax, eax
cmp word [ebx + 0x22], ax
je 0x499370
push 7
pop ecx
lea esi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
jmp 0x49937c
lea esi, [esp + 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x49936a
xor eax, eax
cmp dword [ebp + 0x2c], 0
jne 0x4993aa
push edi
push eax
push dword [0x5acc94]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push edi
lea ecx, [esp + 0x54]
mov dword [ebp + 0x2c], eax
push ecx
push eax
mov dword [ebp + 0x30], edi
mov dword [ebp + 0x34], eax
call fcn.0045c210
add esp, 0xc
jmp 0x4993dd
mov eax, dword [ebp + 0x30]
add eax, edi
push eax
push dword [ebp + 0x2c]
push 8
push dword [0x5acc94]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
lea eax, [esp + 0x50]
push edi
push eax
mov eax, dword [ebp + 0x30]
add eax, ecx
mov dword [ebp + 0x2c], ecx
push eax
call fcn.0045c210
add esp, 0xc
add dword [ebp + 0x30], edi
mov eax, dword [esp + 0x20]
mov dword [eax], ebp
mov ecx, dword [ebx + 0x24]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x840
ret
Function at 0x49954b
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, ebx
cmp dword [esi], 1
jne 0x499571
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
jmp 0x4995ad
cmp dword [esi + 0x2c], ebx
je 0x4995ad
mov edi, dword [ebp + 0x10]
cmp edi, dword [esi + 0x30]
cmovg edi, dword [esi + 0x30]
push edi
push dword [esi + 0x34]
push dword [ebp + 0xc]
call fcn.0045c210
sub dword [esi + 0x30], edi
add esp, 0xc
add dword [esi + 0x34], edi
cmp dword [esi + 0x30], ebx
jne 0x4995ad
push dword [esi + 0x2c]
push ebx
push dword [0x5acc94]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi + 0x2c], ebx
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 0xc

Function at 0x499663
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
push fcn.004995b6
push 0x10
push 0x2c
call fcn.004bf151
push 0
push 0
push 8
mov dword [0x5adce8], eax
call fcn.004bef78
cmp word [0x5adce0], 0
mov dword [0x5af480], eax
jne 0x499743
lea eax, [esp]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
neg eax
push str.ws2_32.dll
sbb eax, eax
inc eax
mov word [0x5adce0], ax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x5adcec], eax
test eax, eax
je 0x499743
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.getaddrinfo
push eax
call esi
push str.freeaddrinfo
push dword [0x5adcec]
mov dword [0x5adcd0], eax
call esi
push str.getnameinfo
push dword [0x5adcec]
mov dword [0x5adcd4], eax
call esi
push str.WSAStringToAddressA
push dword [0x5adcec]
mov dword [0x5adcd8], eax
call esi
cmp dword [0x5adcd0], 0
mov ecx, eax
mov dword [0x5adcdc], ecx
pop esi
je 0x499743
cmp dword [0x5adcd4], 0
je 0x499743
cmp dword [0x5adcd8], 0
je 0x499743
mov eax, dword [0x5adce4]
xor edx, edx
inc edx
test ecx, ecx
cmovne eax, edx
mov dword [0x5adce4], eax
add esp, 0x190
ret
Function at 0x499df2
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
xor esi, esi
cmp eax, 0xffffffff
jne 0x499e15
lea eax, [ebp + 0xc]
push eax
push 0x4004667f
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x499e5e
push 2
push eax
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x499e54
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2745
je 0x499e4f
cmp eax, 0x2746
je 0x499e4f
cmp eax, 0x2749
je 0x499e4f
cmp eax, 0x274a
jne 0x499e5e
push 0xfffffffffffffffe
pop esi
jmp 0x499e5e
push 0xfffffffffffffffe
test eax, eax
mov esi, eax
pop ecx
cmove esi, ecx
mov eax, esi
pop esi
pop ebp
ret 0xc
Function at 0x49b610
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x5af484]
call fcn.004bf07f
mov esi, eax
test esi, esi
je 0x49b68f
cmp dword [esi + 4], 0
je 0x49b660
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.0049bb90
test eax, eax
je 0x49b654
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49b69a
cmp dword [esp + 8], 0
je 0x49b69a
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4

Function at 0x49b860
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
cmp edi, 0xffffffff
jne 0x49b879
push dword [0x5af484]
call fcn.004bf1f9
pop edi
ret 4
push esi
push edi
push dword [0x5af484]
call fcn.004bf07f
mov esi, eax
test esi, esi
je 0x49b8e3
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x49b8cf
cmp dword [esi + 0x14], 0
mov dword [esp + 0xc], 0
jne 0x49b8be
push 0
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push ecx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
push dword [esi + 4]
push 0
push dword [0x5acc94]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push dword [0x5af484]
call fcn.004bf030
pop esi
pop edi
ret 4

Function at 0x49b8f0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x49b92c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4
Function at 0x49b970
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x49ba6e
cmp word [edx], 0
je 0x49ba6e
mov ecx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
test ecx, ecx
jne 0x49b99e
mov ecx, dword [esi + 0x18]
push edi
cmp ecx, 0x19
jne 0x49b9f4
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49b9b0
sub ecx, edi
sar ecx, 1
cmp dword [esi + 4], 0
je 0x49b9d6
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.0049c1a0
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea eax, [esp + 0xc]
push eax
lea eax, [ecx + ecx]
push eax
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
lea eax, [esp + 0x14]
push eax
push edx
xor edx, edx
mov eax, 0xfde9
cmp ecx, 2
cmovne eax, edx
push eax
call fcn.0049c2c0
mov edi, eax
test edi, edi
je 0x49b9ea
cmp dword [esi + 4], 0
je 0x49ba41
push dword [esp + 0x14]
push edi
push esi
call fcn.0049c1a0
push edi
push 0
push dword [0x5acc94]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x1c]
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
push dword [0x5acc94]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
pop ecx
ret 0xc

Function at 0x49ba80
Capabilities:
Write file on windows

Disassembly:
push dword [esp + 4]
push dword [0x5af484]
call fcn.004bf07f
test eax, eax
je 0x49ba9c
mov dword [esp + 4], eax
jmp fcn.0049b970
xor eax, eax
ret 0xc
Function at 0x49bb90
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
push edi
cmp dword [ebx + 0x14], 0
jne 0x49bbb3
push ebx
call fcn.0049b8f0
mov dword [ebx + 0x14], 1
mov dword [ebx + 0xc], 0
mov esi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
mov ebp, dword [esp + 0x20]
sub eax, esi
add eax, dword [ebx + 4]
mov dword [esp + 0x10], esi
cmp esi, ebp
jl 0x49bc37
mov ecx, ebp
sub ecx, 1
je 0x49bc22
sub ecx, 1
je 0x49bc0b
sub ecx, 2
je 0x49bbf6
push ebp
push eax
push dword [esp + 0x24]
call fcn.0045c210
add esp, 0xc
mov eax, ebp
sub dword [ebx + 0xc], ebp
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
mov dword [eax], ecx
mov eax, ebp
sub dword [ebx + 0xc], ebp
pop ebp
pop ebx
pop ecx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
mov word [eax], cx
mov eax, ebp
sub dword [ebx + 0xc], ebp
pop ebp
pop ebx
pop ecx
ret 0xc
mov ecx, dword [esp + 0x1c]
mov dl, byte [eax]
mov eax, ebp
pop edi
pop esi
mov byte [ecx], dl
sub dword [ebx + 0xc], ebp
pop ebp
pop ebx
pop ecx
ret 0xc
push esi
push eax
mov eax, dword [esp + 0x24]
push eax
call fcn.0045c210
mov eax, dword [esp + 0x28]
add esp, 0xc
mov edx, dword [ebx + 8]
add eax, esi
mov ecx, dword [ebx]
sub ebp, esi
mov dword [esp + 0x1c], eax
push 0
cmp ebp, edx
jl 0x49bc80
lea edx, [esp + 0x1c]
push edx
push ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x18]
pop edi
add eax, esi
mov dword [ebx + 0xc], 0
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
lea eax, [esp + 0x1c]
push eax
push edx
push dword [ebx + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [esp + 0x18]
cmp ebp, esi
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0xc], esi
mov dword [ebx + 0x10], esi
cmovle esi, ebp
push esi
push dword [ebx + 4]
push eax
call fcn.0045c210
sub dword [ebx + 0xc], esi
add esp, 0xc
mov eax, dword [esp + 0x10]
add eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
Function at 0x49bcd0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push 0x1000
push 0
push dword [0x5acc94]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x49be60
mov cl, byte [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
push esi
push edi
mov esi, edx
nop
cmp ebp, 0xffffffff
je 0x49bd1e
test ebp, ebp
je 0x49bdc6
dec ebp
cmp dword [ebx + 4], 0
lea edi, [ebx + 4]
je 0x49bd3a
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.0049bb90
mov dword [esp + 0x10], eax
jmp 0x49bd54
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
mov cl, byte [esp + 0x24]
cmp eax, 1
jne 0x49bdc9
test cl, cl
je 0x49bd68
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x24]
mov eax, dword [esp + 0x14]
mov edi, esi
mov edx, dword [esp + 0x1c]
dec eax
sub edi, edx
cmp edi, eax
jle 0x49bda3
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x5acc94]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x24]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [edi + edx]
test cl, cl
je 0x49bdc6
cmp dword [esp + 0x28], 0
jne 0x49bd10
cmp cl, 0xd
je 0x49bdd2
cmp cl, 0xa
jne 0x49bd10
dec esi
jmp 0x49be43
lea edi, [ebx + 4]
cmp dword [esp + 0x28], 0
jne 0x49be43
jmp 0x49bdd5
lea edi, [ebx + 4]
cmp cl, 0xa
jne 0x49bddd
dec esi
jmp 0x49be43
cmp cl, 0xd
jne 0x49be43
dec esi
cmp dword [edi], 0
je 0x49bdfb
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.0049bb90
mov dword [esp + 0x10], eax
jmp 0x49be11
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x24], 0xa
je 0x49be43
cmp dword [edi], 0
je 0x49be22
inc dword [ebx + 0xc]
jmp 0x49be43
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x30]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
xor eax, eax
pop ebx
add esp, 0x10
ret 0x10
Function at 0x49be70
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push 0x1000
push 0
push dword [0x5acc94]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 8], edx
test edx, edx
je 0x49c02f
mov ax, word [esp + 0x1c]
push ebp
push esi
push edi
mov edi, edx
mov dword [esp + 0x1c], 0x1000
mov dword [esp + 0x18], 0x7ff
mov ecx, dword [esp + 0x30]
cmp ecx, 0xffffffff
je 0x49bec9
test ecx, ecx
je 0x49bf8c
dec ecx
mov dword [esp + 0x30], ecx
cmp dword [ebx + 4], 0
lea ebp, [ebx + 4]
je 0x49bee5
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.0049bb90
mov dword [esp + 0x10], eax
jmp 0x49beff
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
cmp eax, 2
mov ax, word [esp + 0x28]
jne 0x49bf8f
test ax, ax
je 0x49bf1d
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x28]
mov edx, dword [esp + 0x14]
mov esi, edi
mov ecx, dword [esp + 0x18]
sub esi, edx
sar esi, 1
cmp esi, ecx
jle 0x49bf64
mov eax, dword [esp + 0x1c]
add ecx, 0x800
add eax, 0x1000
mov dword [esp + 0x18], ecx
push eax
push edx
push 8
push dword [0x5acc94]
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
mov ax, word [esp + 0x28]
mov dword [esp + 0x14], edx
lea edi, [edx + esi*2]
test ax, ax
je 0x49bf8f
cmp dword [esp + 0x2c], 0
jne 0x49beb3
cmp ax, 0xd
je 0x49bf96
cmp ax, 0xa
jne 0x49beb3
sub edi, 2
jmp 0x49c00e
lea ebp, [ebx + 4]
cmp dword [esp + 0x2c], 0
jne 0x49c00e
cmp ax, 0xa
jne 0x49bfa1
sub edi, 2
jmp 0x49c00e
cmp ax, 0xd
jne 0x49c00e
sub edi, 2
cmp dword [ebp], 0
je 0x49bfc3
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.0049bb90
mov dword [esp + 0x10], eax
jmp 0x49bfd9
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x28], 0xa
je 0x49c00e
cmp dword [ebp], 0
je 0x49bfed
add dword [ebx + 0xc], 2
jmp 0x49c00e
push 1
lea eax, [esp + 0x24]
mov dword [esp + 0x20], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, edi
sub ecx, dword [esp + 0x14]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
pop ebx
add esp, 0x14
ret 0x10
Function at 0x49c040
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x5acc94]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x49c190
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x49c08c
test edi, edi
je 0x49c0fd
dec edi
push esi
push ebp
call fcn.0049c330
mov dword [esp + 0x20], eax
test eax, eax
jne 0x49c09f
xor cl, cl
jmp 0x49c0a1
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x49c0e4
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x5acc94]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x49c0fd
test eax, eax
jne 0x49c082
cmp cl, 0xd
je 0x49c101
cmp cl, 0xa
jne 0x49c082
dec esi
jmp 0x49c173
test eax, eax
jne 0x49c173
cmp cl, 0xa
jne 0x49c109
dec esi
jmp 0x49c173
cmp cl, 0xd
jne 0x49c173
dec esi
cmp dword [ebp + 4], 0
je 0x49c128
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.0049bb90
mov dword [esp + 0x20], eax
jmp 0x49c13f
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x49c173
cmp dword [ebp + 4], 0
je 0x49c151
inc dword [ebp + 0xc]
jmp 0x49c173
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x49c1a0
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x10], 0
cmp dword [edi + 0x1c], 0
jne 0x49c2b7
cmp dword [edi + 0x14], 1
push ebx
push ebp
jne 0x49c1ed
mov eax, dword [edi + 0xc]
lea ecx, [esp + 0x10]
push 1
neg eax
cdq
push ecx
push eax
push dword [edi]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0xc], eax
mov eax, dword [edi + 0xc]
push esi
mov esi, dword [esp + 0x24]
cmp eax, esi
jle 0x49c276
mov ecx, dword [edi + 4]
sub ecx, eax
mov eax, esi
add ecx, dword [edi + 8]
sub eax, 1
je 0x49c25f
sub eax, 1
je 0x49c246
sub eax, 2
je 0x49c22f
push esi
push dword [esp + 0x24]
push ecx
call fcn.0045c210
add esp, 0xc
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov ax, word [eax]
mov word [ecx], ax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov al, byte [eax]
mov byte [ecx], al
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
push edi
call fcn.0049b8f0
mov eax, dword [edi + 8]
cmp esi, eax
jl 0x49c2a5
push 0
lea eax, [esp + 0x20]
push eax
push esi
push dword [esp + 0x2c]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov ecx, dword [edi + 4]
sub ecx, dword [edi + 0xc]
push esi
push dword [esp + 0x24]
add ecx, eax
jmp 0x49c217
xor eax, eax
pop edi
add esp, 8
ret 0xc
Function at 0x49c330
Capabilities:
Read file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [edi + 4], 0
je 0x49c357
push 1
lea eax, [esp + 0x10]
push eax
push edi
call fcn.0049bb90
mov dword [esp + 4], eax
jmp 0x49c371
push 0
lea eax, [esp + 8]
push eax
push 1
lea eax, [esp + 0x18]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 4]
cmp eax, 1
jne 0x49c424
mov cl, byte [esp + 0xc]
test cl, cl
js 0x49c396
mov eax, dword [esp + 0x10]
pop edi
mov byte [eax], cl
mov byte [eax + 1], 0
mov eax, 1
pop ecx
ret 8
mov al, cl
and al, 0xe0
push esi
cmp al, 0xc0
jne 0x49c3a6
mov esi, 2
jmp 0x49c3c2
mov al, cl
and al, 0xf0
cmp al, 0xe0
jne 0x49c3b5
mov esi, 3
jmp 0x49c3c2
mov al, cl
and al, 0xf8
cmp al, 0xf0
jne 0x49c410
mov esi, 4
mov eax, dword [esp + 0x14]
push ebx
lea ebx, [esi - 1]
mov byte [eax], cl
inc eax
cmp dword [edi + 4], 0
je 0x49c3eb
push ebx
push eax
push edi
call fcn.0049bb90
xor ecx, ecx
cmp eax, ebx
pop ebx
cmovne esi, ecx
mov eax, esi
pop esi
pop edi
pop ecx
ret 8
push 0
lea ecx, [esp + 0x10]
push ecx
push ebx
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0xc]
xor ecx, ecx
cmp eax, ebx
pop ebx
cmovne esi, ecx
mov eax, esi
pop esi
pop edi
pop ecx
ret 8
mov eax, dword [esp + 0x14]
pop esi
pop edi
mov word [eax], 0x3f
mov eax, 1
pop ecx
ret 8
xor eax, eax
pop edi
pop ecx
ret 8

Function at 0x49d092
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0xc
push ebx
push esi
push edi
xor esi, esi
call fcn.004a9813
mov edi, eax
test edi, edi
je 0x49d174
cmp dword [edi + 0x14], esi
je 0x49d174
cmp dword [edi], 0xf
jne 0x49d174
push dword [edi + 0x18]
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x49d174
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x49d169
push dword [edi + 0x18]
push dword [edi + 0x14]
push eax
call fcn.0045c210
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
push esi
push 0xffffffffffffffff
push ebx
call dword [sym.imp.SHELL32.dll_DragQueryFileW]
mov dword [esp + 0xc], eax
test eax, eax
jle 0x49d169
push ebp
lea edi, [eax - 1]
mov ebp, esi
push esi
push esi
push ebp
push ebx
call dword [sym.imp.SHELL32.dll_DragQueryFileW]
add edi, eax
inc ebp
cmp ebp, dword [esp + 0x10]
jl 0x49d10e
push dword [esp + 0x20]
mov dword [esp + 0x1c], edi
push edi
call fcn.004bfd50
lea ecx, [edi + 1]
mov ebp, eax
mov edi, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
push ecx
push ebp
push esi
push ebx
call dword [sym.imp.SHELL32.dll_DragQueryFileW]
push 0xa
pop ecx
lea ebp, [ebp + eax*2]
mov word [ebp], cx
mov eax, ebp
mov ecx, dword [esp + 0x14]
add ebp, 2
inc esi
cmp esi, edi
jl 0x49d13c
mov esi, dword [esp + 0x18]
xor ecx, ecx
mov word [eax], cx
pop ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test esi, esi
jne 0x49d17f
pop edi
pop esi
pop ebx
add esp, 0xc
jmp fcn.004bfe00
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4