joyce8/EMBER2024-capa huggingface dataset:
Function at 0x506220
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x62ee75
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov edx, dword [esp + 0x18]
push ebx
push esi
mov esi, dword [esp + 0x1c]
lea eax, [edx + edx*2]
push edi
mov edi, esi
lea ecx, [eax + eax*4]
xor eax, eax
shl ecx, 3
mov ebx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, edx
dec edx
test eax, eax
je 0x506314
inc edx
push ebp
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], esi
test esi, esi
mov dword [esp + 0x1c], 0
je 0x5062f5
mov ecx, dword [0x63f2ec]
mov dword [esi], ecx
mov edx, dword [0x63f2ec]
lea edi, [esi + 4]
mov dword [edi], edx
lea ebp, [esi + 8]
mov byte [esp + 0x1c], 2
mov ecx, ebp
call fcn.0049bcf0
lea ebx, [esi + 0x3c]
mov byte [esp + 0x1c], 3
mov ecx, ebx
call fcn.0049bcf0
mov eax, dword [0x63f2ec]
mov dword [esi + 0x74], eax
push 0x6afaac
mov ecx, esi
mov byte [esp + 0x20], 5
call fcn.0044f0d0
push 0x6afaac
mov ecx, edi
call fcn.0044f0d0
mov ecx, ebp
call fcn.0049bf90
mov ecx, ebx
call fcn.0049bf90
push 0x6afaac
lea ecx, [esi + 0x74]
mov dword [esi + 0x70], 0
call fcn.0044f0d0
mov eax, dword [esp + 0x28]
add esi, 0x78
dec eax
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], eax
jne 0x50626d
pop ebp
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 8

Function at 0x506330
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x62eec8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov edx, dword [esp + 0x18]
push ebx
mov ecx, edx
push esi
mov esi, dword [esp + 0x1c]
push edi
shl ecx, 4
add ecx, edx
xor eax, eax
shl ecx, 3
mov ebx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, edx
dec edx
test eax, eax
je 0x506436
inc edx
push ebp
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], esi
test esi, esi
mov dword [esp + 0x1c], 0
je 0x506414
mov ecx, dword [0x63f2ec]
mov dword [esi], ecx
mov edx, dword [0x63f2ec]
lea edi, [esi + 4]
mov dword [edi], edx
lea ebp, [esi + 8]
mov byte [esp + 0x1c], 2
mov ecx, ebp
call fcn.0049bcf0
lea ebx, [esi + 0x3c]
mov byte [esp + 0x1c], 3
mov ecx, ebx
call fcn.0049bcf0
mov eax, dword [0x63f2ec]
mov dword [esi + 0x80], eax
push 0x6afaac
mov ecx, esi
mov byte [esp + 0x20], 5
call fcn.0044f0d0
push 0x6afaac
mov ecx, edi
call fcn.0044f0d0
mov ecx, ebp
call fcn.0049bf90
mov ecx, ebx
call fcn.0049bf90
xor eax, eax
push 0x6afaac
mov dword [esi + 0x78], eax
lea ecx, [esi + 0x80]
mov dword [esi + 0x70], eax
mov dword [esi + 0x7c], eax
call fcn.0044f0d0
mov eax, dword [esp + 0x28]
add esi, 0x88
dec eax
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], eax
jne 0x50637e
pop ebp
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x5086f0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x62f380
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push esi
push edi
mov esi, ecx
push str.___:_:
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], 0
call fcn.005f008e
push 0x6afac4
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 1
call fcn.005f008e
push 0x69a9bc
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], 2
call fcn.005f008e
push 0x6afac4
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 3
call fcn.005f008e
lea edi, [esi + 0x144]
push 0x6afac4
mov ecx, edi
mov byte [esp + 0x2c], 4
call fcn.005f01a9
mov eax, dword [esp + 0x30]
xor esi, esi
mov ecx, dword [eax - 8]
test ecx, ecx
jle 0x5087fe
mov al, byte [esi + eax]
mov byte [esp + 0x1c], al
movsx eax, al
push eax
call fcn.00436d4b
add esp, 4
test eax, eax
je 0x5087e6
push 0x6afac4
lea ecx, [esp + 0x14]
call fcn.005f008e
push esi
lea ecx, [esp + 0x14]
push 0x6813ec
push ecx
mov byte [esp + 0x34], 5
call fcn.005e6068
add esp, 0xc
lea edx, [esp + 0x10]
lea ecx, [esp + 8]
push edx
call fcn.005f0438
mov eax, dword [esp + 0x1c]
mov ecx, edi
push eax
call fcn.005f0423
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 4
call fcn.005f0020
jmp 0x5087f4
mov ecx, dword [esp + 0x1c]
push ecx
lea ecx, [esp + 0x10]
call fcn.005f0423
mov eax, dword [esp + 0x30]
inc esi
cmp esi, dword [eax - 8]
jl 0x50877f
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x18]
push edx
push eax
call fcn.0043733c
add esp, 8
test eax, eax
pop edi
pop esi
je 0x508888
mov ecx, dword [esp]
mov edx, dword [esp + 0xc]
push ecx
push edx
call fcn.0043733c
add esp, 8
test eax, eax
je 0x508888
lea ecx, [esp]
mov byte [esp + 0x20], 3
call fcn.005f0020
lea ecx, [esp + 0xc]
mov byte [esp + 0x20], 2
call fcn.005f0020
lea ecx, [esp + 4]
mov byte [esp + 0x20], 1
call fcn.005f0020
lea ecx, [esp + 0x10]
mov byte [esp + 0x20], 0
call fcn.005f0020
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], 0xffffffff
call fcn.005f0020
xor eax, eax
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret 4
lea ecx, [esp]
mov byte [esp + 0x20], 3
call fcn.005f0020
lea ecx, [esp + 0xc]
mov byte [esp + 0x20], 2
call fcn.005f0020
lea ecx, [esp + 4]
mov byte [esp + 0x20], 1
call fcn.005f0020
lea ecx, [esp + 0x10]
mov byte [esp + 0x20], 0
call fcn.005f0020
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], 0xffffffff
call fcn.005f0020
mov ecx, dword [esp + 0x18]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0x24
ret 4
Function at 0x5097b0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
cmp dword [esi + 0xc], 0xffffffff
je 0x5097c0
mov eax, dword [esi]
call dword [eax + 0x14]
mov eax, dword [esp + 0x10]
dec eax
je 0x50981e
dec eax
je 0x5097d2
pop edi
xor eax, eax
pop esi
pop ecx
ret 4
xor edi, edi
push edi
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
jne 0x5097ef
pop edi
xor eax, eax
pop esi
pop ecx
ret 4
push edi
lea ecx, [esp + 0x14]
push edi
push ecx
push edi
push edi
lea edx, [esp + 0x1c]
push 4
push edx
push 0x9800000c
push eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x2c], edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
pop edi
mov eax, 1
pop esi
pop ecx
ret 4
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
jne 0x50983a
pop edi
xor eax, eax
pop esi
pop ecx
ret 4
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
push 0xffff
push eax
mov dword [esp + 0x24], 1
call edi
mov eax, dword [esi + 0xc]
lea edx, [esp + 0x10]
push 4
push edx
push 1
push 6
push eax
call edi
pop edi
mov eax, 1
pop esi
pop ecx
ret 4

Function at 0x509880
Capabilities:
Connect socket

Disassembly:
sub esp, 0x10
xor eax, eax
push esi
mov dword [esp + 4], eax
mov esi, ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
push ecx
mov dword [esp + 0x14], eax
mov word [esp + 8], 2
call dword [sym.imp.WS2_32.dll_htonl]
mov edx, dword [esp + 0x1c]
mov dword [esp + 8], eax
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esi + 0xc]
mov word [esp + 6], ax
lea eax, [esp + 4]
push 0x10
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
neg eax
sbb eax, eax
pop esi
inc eax
add esp, 0x10
ret 8

Function at 0x5098e0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 8
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 0xffffffff
je 0x509968
mov eax, dword [esi + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x509942
mov ecx, dword [esi + 0x18]
xor eax, eax
mov dword [esp + 9], eax
push edi
mov edi, dword [sym.imp.WS2_32.dll_htonl]
mov word [esp + 0x11], ax
push ecx
mov byte [esp + 0x10], bl
mov byte [esp + 0x17], al
call edi
push ebx
mov dword [esp + 0x10], eax
call edi
lea edx, [esp + 0xc]
push 8
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
push edx
push 0xd
push ebx
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
pop edi
jge 0x509942
pop esi
xor eax, eax
pop ebx
add esp, 8
ret
mov ecx, dword [esi + 0xc]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_shutdown]
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0xc], 0xffffffff
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
pop esi
mov eax, 1
pop ebx
add esp, 8
ret
Function at 0x515080
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
push esi
mov esi, eax
shr eax, 4
and esi, 0xf
inc eax
push edi
mov edi, dword [esp + 0xc]
and eax, 0xffff
push ecx
push eax
push 6
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
test eax, eax
je 0x5150ce
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x5150ce
xor edx, edx
xor ecx, ecx
mov cx, word [eax]
add eax, 2
cmp esi, edx
je 0x5150d3
inc edx
lea eax, [eax + ecx*2]
cmp edx, 0x10
jl 0x5150b9
pop edi
xor eax, eax
pop esi
ret
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
test edi, edi
jne 0x5150e3
test esi, esi
jne 0x515101
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jle 0x5150ff
mov byte [eax + esi - 1], 0
jne 0x515108
mov byte [esi + edi - 1], 0
mov eax, edi
pop edi
dec eax
pop esi
ret

Function at 0x51a860
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
push esi
push edi
mov esi, dword [esp + 0xc]
mov edi, eax
shr eax, 4
and edi, 0xf
inc eax
and eax, 0xffff
push ecx
push eax
push 6
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
test eax, eax
je 0x51a8b0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
je 0x51a8b0
xor ecx, ecx
xor eax, eax
mov ax, word [esi]
add esi, 2
cmp edi, ecx
je 0x51a8b5
inc ecx
lea esi, [esi + eax*2]
cmp ecx, 0x10
jl 0x51a89b
pop edi
xor eax, eax
pop esi
ret
mov edx, dword [esp + 0x1c]
lea ecx, [edx - 1]
cmp eax, ecx
jle 0x51a8c2
mov eax, ecx
lea edx, [eax + eax]
push ebx
mov ebx, dword [esp + 0x1c]
mov ecx, edx
push ebp
mov ebp, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
pop ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [edx + ebx], 0
pop ebx
pop edi
pop esi
ret
Function at 0x5233d0
Capabilities:
Get user security identifier

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x14]
lea eax, [esp + 0x18]
push edi
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0xc]
xor ebx, ebx
push eax
push ecx
lea edx, [esp + 0x18]
push ebx
push edx
push ebx
push ebp
push ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov dword [edi], ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x52341b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x52341b
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0x10]
push esi
push eax
call fcn.005f17db
mov ecx, dword [esp + 0x14]
mov dword [edi], eax
lea edx, [ecx + ecx]
push edx
call fcn.005f17db
mov esi, eax
mov eax, dword [edi]
add esp, 8
test eax, eax
je 0x523460
test esi, esi
je 0x523471
lea ecx, [esp + 0x20]
lea edx, [esp + 0x10]
push ecx
push edx
lea ecx, [esp + 0x1c]
push esi
push ecx
push eax
push ebp
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ebx, eax
test esi, esi
je 0x52346d
push esi
call fcn.005f1804
add esp, 4
test ebx, ebx
jne 0x523480
mov edi, dword [edi]
test edi, edi
je 0x523480
push edi
call fcn.005f1804
add esp, 4
pop esi
pop edi
mov eax, ebx
pop ebp
pop ebx
add esp, 8
ret
Function at 0x52e5f0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.00435930
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x52e6bb
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x52e6bb
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x52e66e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x52e679
or bh, 8
and edi, 0x8000000
je 0x52e694
mov eax, dword [0x6b60dc]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x52e6bb
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x52ea90
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x52eabb
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x52eadf
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x52eafa
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x534f10
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, 0x8000
push edi
cmp eax, esi
mov dword [esp + 0x14], esi
jbe 0x534f2e
mov dword [esp + 0x14], eax
mov esi, eax
push esi
call fcn.005f17db
mov ecx, esi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
mov ebp, dword [esp + 0x24]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x10], ebx
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x24]
push 0
push 0
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
jne 0x534f6d
xor ebx, ebx
jmp 0x534f8a
lea eax, [esp + 0x24]
push 0
push eax
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x534f86
or ebx, 0xffffffff
jmp 0x534f8a
mov ebx, dword [esp + 0x24]
push 0
push 0
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x534fdd
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push 0
push ecx
push eax
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x534fc2
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
cmp ecx, eax
je 0x534fd9
mov ecx, dword [esp + 0x10]
push ecx
call fcn.005f1804
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x2c]
cmp ebx, esi
jae 0x535002
test ebx, ebx
je 0x5350d6
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x2c]
push 0
push edx
push ebx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x5350d6
lea ecx, [ebx + edi]
add edi, eax
push esi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], edi
call fcn.005f17db
mov ecx, esi
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x24], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x535036
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
jg 0x535075
push 0
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
je 0x535075
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x28]
push 0
push eax
push esi
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x53506f
or esi, 0xffffffff
jmp 0x535077
mov esi, dword [esp + 0x28]
jmp 0x535077
xor esi, esi
mov edx, dword [esp + 0x2c]
push 0
push 0
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test ebx, ebx
je 0x53509f
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push 0
push eax
push ebx
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
add edx, ebx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x20]
add edi, esi
mov dword [esp + 0x10], edx
test esi, esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], eax
mov ebx, esi
jg 0x535032
push eax
call fcn.005f1804
add esp, 4
mov eax, dword [esp + 0x10]
push eax
call fcn.005f1804
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x5350f0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push 0
push 0
push esi
call edi
cmp eax, 0xffffffff
jne 0x535113
or ebx, eax
jmp 0x535115
mov ebx, eax
push 2
push 0
push 0
push esi
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x1c], 0xffffffff
je 0x53512f
mov dword [esp + 0x1c], eax
push 0
push ebx
push esi
call fcn.00535430
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
sub eax, ebp
sub ecx, ebp
add esp, 0xc
cmp ecx, eax
mov dword [esp + 0x20], ecx
jl 0x535157
mov dword [esp + 0x20], eax
push 0x8000
call fcn.005f17db
mov ebx, eax
add esp, 4
mov ecx, 0x2000
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x20]
push 0
push 0
lea ecx, [eax + ebp]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x24]
push 0
push edx
push 0x8000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x5351a1
or eax, 0xffffffff
jmp 0x5351dd
mov edi, dword [esp + 0x24]
mov eax, edi
test edi, edi
mov dword [esp + 0x14], eax
jle 0x5351dd
push 0
push 0
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test edi, edi
je 0x5351d9
lea eax, [esp + 0x10]
push 0
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5351e8
cmp dword [esp + 0x10], edi
jne 0x5351e8
mov eax, dword [esp + 0x14]
add ebp, eax
cmp eax, 0x8000
jne 0x5351fb
jmp 0x535171
push ebx
call fcn.005f1804
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
push 0
sub eax, ecx
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
call fcn.005f1804
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x535230
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x6309db
push eax
mov dword fs:[0], esp
sub esp, 0xa0
push ebx
mov ebx, dword [esp + 0xb4]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
je 0x5353d4
push ebx
call fcn.00435355
add esp, 4
test eax, eax
je 0x5353d4
push ebx
lea ecx, [esp + 0x18]
call fcn.005f00e0
mov esi, dword [esp + 0xc4]
mov dword [esp + 0xb8], ebp
cmp esi, ebp
je 0x5352a1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x5353c0
neg esi
sbb esi, esi
mov dword [esp + 0x18], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileW]
and esi, 0xc0000000
add esi, 0xc0000000
or edi, 0xffffffff
cmp edi, 0xffffffff
jne 0x535374
mov eax, dword [esp + 0x18]
test eax, eax
je 0x5352d7
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x69b348]
cmp eax, 0xffffffff
jne 0x535312
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x94
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esp + 0x2c]
xor eax, eax
cmp ecx, 2
sete al
mov dword [0x69b348], eax
test eax, eax
je 0x53532b
push 0
push 0x80
push 4
push 0
push 1
push esi
push ebx
call ebp
mov edi, eax
jmp 0x535359
push ebx
lea ecx, [esp + 0x14]
call fcn.00448c70
mov edx, dword [esp + 0x10]
push 0
push 0x80
push 4
push 0
push 1
push esi
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [esp + 0x10]
mov edi, eax
call fcn.00449480
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 3
mov dword [esp + 0x18], eax
jl 0x5352be
cmp edi, 0xffffffff
je 0x53540a
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push 0
push 0
push edi
call esi
cmp eax, 0xffffffff
jne 0x53538c
or ebp, eax
jmp 0x53538e
mov ebp, eax
push 2
push 0
push 0
push edi
call esi
cmp eax, 0xffffffff
jne 0x5353a0
or ebx, eax
jmp 0x5353a2
mov ebx, eax
push 0
push 0
push ebp
push edi
call esi
test ebx, ebx
jne 0x53540a
mov eax, dword [esp + 0xc4]
test eax, eax
je 0x5353f0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
mov dword [esp + 0xb8], 0xffffffff
call fcn.005f0020
or eax, 0xffffffff
mov ecx, dword [esp + 0xb0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xac
ret
lea eax, [esp + 0x10]
push 2
push eax
push 0
push edi
mov dword [esp + 0x20], 0xfeff
call fcn.00534f10
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0xb8], 0xffffffff
call fcn.005f0020
mov eax, edi
jmp 0x5353d7