joyce8/EMBER2024-capa huggingface dataset:
Function at 0x50d840
Capabilities:
Encrypt data using curve25519

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x6b5a34]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x20]
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x194]
push edx
mov dword [ebp - 0x238], eax
call fcn.0050d810
push 0
push 0x20
lea eax, [ebp - 0x44]
push ebx
push eax
call fcn.00519f00
push 0
push 0x20
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x194]
push edx
call fcn.00519c40
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push eax
push ecx
lea edx, [ebp - 0x194]
push edi
push edx
call fcn.00519c40
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0x194]
push ecx
call fcn.00519e90
add esp, 0x40
push 0x20
lea eax, [esi + 0x20]
add ebx, 0x20
push ebx
push eax
mov dword [ebp - 0x23c], eax
call fcn.00541db0
lea edx, [ebp - 0x84]
push edx
call fcn.005153d0
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0x234]
push ecx
call fcn.00511680
lea edx, [ebp - 0x234]
push edx
push esi
call fcn.00517140
mov eax, dword [ebp + 0x20]
push eax
lea ecx, [ebp - 0x194]
push ecx
call fcn.0050d810
push 0
push 0x40
lea edx, [ebp - 0x194]
push esi
push edx
call fcn.00519c40
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push eax
push ecx
lea edx, [ebp - 0x194]
push edi
push edx
call fcn.00519c40
add esp, 0x48
lea eax, [ebp - 0xc4]
push eax
lea ecx, [ebp - 0x194]
push ecx
call fcn.00519e90
lea edx, [ebp - 0xc4]
push edx
call fcn.005153d0
mov al, byte [ebp - 0x25]
and byte [ebp - 0x44], 0xf8
and al, 0x3f
or al, 0x40
lea ecx, [ebp - 0x84]
push ecx
mov ecx, dword [ebp - 0x23c]
lea edx, [ebp - 0x44]
mov byte [ebp - 0x25], al
push edx
lea eax, [ebp - 0xc4]
push eax
push ecx
call fcn.00511820
lea edx, [ebp - 0x44]
push 0x40
push edx
call fcn.0050d2b0
lea eax, [ebp - 0x84]
push 0x40
push eax
call fcn.0050d2b0
mov eax, dword [ebp - 0x238]
add esp, 0x2c
pop edi
pop esi
pop ebx
test eax, eax
je 0x50d9c0
mov dword [eax], 0x40
mov dword [eax + 4], 0
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.00531415
mov esp, ebp
pop ebp
ret

Function at 0x50dc50
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push ebp
mov ebp, esp
push esi
call fcn.0050dc20
mov esi, dword [ebp + 0xc]
cmp esi, 0xffffffff
jbe 0x50dc66
call fcn.0050d710
mov eax, dword [ebp + 8]
push esi
push eax
call sub.ADVAPI32.dll_SystemFunction036
pop esi
test al, al
jne 0x50dc7b
pop ebp
jmp fcn.0050d710
pop ebp
ret
Function at 0x511480
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push ebx
mov bl, byte [ebp + 0xc]
push edi
mov al, bl
call fcn.00511430
mov byte [ebp + 0xc], al
neg al
and al, bl
add al, al
sub bl, al
mov eax, esi
call fcn.005113b0
mov cl, 1
mov al, bl
call fcn.00511420
mov edi, dword [ebp + 8]
movzx eax, al
push eax
push esi
call fcn.00511440
mov cl, 2
mov al, bl
call fcn.00511420
movzx ecx, al
push ecx
add edi, 0x78
push esi
call fcn.00511440
mov cl, 3
mov al, bl
call fcn.00511420
mov edi, dword [ebp + 8]
movzx edx, al
push edx
add edi, 0xf0
push esi
call fcn.00511440
mov cl, 4
mov al, bl
call fcn.00511420
mov edi, dword [ebp + 8]
movzx eax, al
push eax
add edi, 0x168
push esi
call fcn.00511440
mov cl, 5
mov al, bl
call fcn.00511420
mov edi, dword [ebp + 8]
movzx ecx, al
push ecx
add edi, 0x1e0
push esi
call fcn.00511440
mov cl, 6
mov al, bl
call fcn.00511420
mov edi, dword [ebp + 8]
movzx edx, al
push edx
add edi, 0x258
push esi
call fcn.00511440
mov cl, 7
mov al, bl
call fcn.00511420
mov edi, dword [ebp + 8]
movzx eax, al
push eax
add edi, 0x2d0
push esi
call fcn.00511440
mov cl, 8
mov al, bl
call fcn.00511420
mov edi, dword [ebp + 8]
movzx ecx, al
push ecx
add edi, 0x348
push esi
call fcn.00511440
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0x78], edx
mov edx, dword [esi + 0x34]
mov dword [ebp - 0x70], ecx
mov ecx, dword [esi + 0x3c]
mov dword [ebp - 0x6c], edx
mov edx, dword [esi + 0x40]
mov dword [ebp - 0x74], eax
mov eax, dword [esi + 0x38]
mov dword [ebp - 0x64], ecx
mov ecx, dword [esi + 0x48]
mov dword [ebp - 0x60], edx
mov edx, dword [esi + 0x4c]
mov dword [ebp - 0x68], eax
mov eax, dword [esi + 0x44]
mov dword [ebp - 0x58], ecx
mov ecx, dword [esi + 4]
mov dword [ebp - 0x54], edx
mov edx, dword [esi + 8]
mov dword [ebp - 0x5c], eax
mov eax, dword [esi]
mov dword [ebp - 0x4c], ecx
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x48], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x50], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x40], ecx
mov ecx, dword [esi + 0x1c]
mov dword [ebp - 0x3c], edx
mov edx, dword [esi + 0x20]
mov dword [ebp - 0x44], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x34], ecx
mov ecx, dword [esi + 0x50]
mov dword [ebp - 0x30], edx
mov edx, dword [esi + 0x54]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x24]
neg ecx
neg edx
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 0x58]
mov dword [ebp - 0x28], ecx
mov ecx, dword [esi + 0x5c]
mov dword [ebp - 0x24], edx
mov edx, dword [esi + 0x60]
neg eax
neg ecx
neg edx
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x64]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [esi + 0x68]
mov dword [ebp - 0x18], edx
mov edx, dword [esi + 0x6c]
neg eax
neg ecx
neg edx
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x70]
mov dword [ebp - 0x10], ecx
mov ecx, dword [esi + 0x74]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0xc]
add esp, 0x40
push edx
neg eax
neg ecx
push esi
lea edi, [ebp - 0x78]
mov dword [ebp - 8], eax
mov dword [ebp - 4], ecx
call fcn.00511440
add esp, 8
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x519f60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp + 0xc], ecx
mov dword [ebp + 8], eax
mov edx, dword [ebp + 0xc]
movzx edx, byte [edx + eax]
mov ecx, dword [ebp - 4]
movzx ecx, byte [ecx + eax]
xor ecx, edx
or dword [ebp + 8], ecx
inc eax
cmp eax, 0x10
jl 0x519f75
mov eax, dword [ebp + 8]
dec eax
shr eax, 8
and eax, 1
dec eax
mov esp, ebp
pop ebp
ret

Function at 0x51a310
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
mov edx, dword [ecx]
mov dword [eax + 0x14], edx
mov edx, dword [ecx + 4]
mov dword [eax + 0x28], edx
mov edx, dword [ecx + 8]
mov dword [eax + 0x3c], edx
mov edx, dword [ecx + 0xc]
mov dword [eax + 0x30], edx
mov edx, dword [ecx + 0x10]
mov dword [eax + 0x1c], edx
mov edx, dword [ecx + 0x14]
mov dword [eax + 0x10], edx
mov edx, dword [ecx + 0x18]
mov dword [eax + 0x24], edx
mov ecx, dword [ecx + 0x1c]
mov dword [eax + 0x38], ecx
mov dword [eax], 0x61707865
mov dword [eax + 4], 0x3320646e
mov dword [eax + 8], 0x79622d32
mov dword [eax + 0xc], 0x6b206574
ret
Function at 0x51b8b0
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
mov dword [eax], 0x61707865
mov dword [eax + 4], 0x3320646e
mov dword [eax + 8], 0x79622d32
mov dword [eax + 0xc], 0x6b206574
mov edx, dword [ecx]
mov dword [eax + 0x10], edx
mov edx, dword [ecx + 4]
mov dword [eax + 0x14], edx
mov edx, dword [ecx + 8]
mov dword [eax + 0x18], edx
mov edx, dword [ecx + 0xc]
mov dword [eax + 0x1c], edx
mov edx, dword [ecx + 0x10]
mov dword [eax + 0x20], edx
mov edx, dword [ecx + 0x14]
mov dword [eax + 0x24], edx
mov edx, dword [ecx + 0x18]
mov dword [eax + 0x28], edx
mov ecx, dword [ecx + 0x1c]
mov dword [eax + 0x2c], ecx
ret
Function at 0x51d590
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x6b5a34]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push ebx
push esi
mov byte [ebp - 0xc], al
mov dword [ebp - 0xb], eax
mov word [ebp - 7], ax
mov eax, dword [ebp + 8]
mov esi, 0x6750b0
push edi
sub esi, eax
mov edi, 0x1f
mov edi, edi
mov cl, byte [eax]
movzx edx, byte [esi + eax - 0x20]
xor dl, cl
or byte [ebp - 0xc], dl
movzx edx, byte [esi + eax]
xor dl, cl
or byte [ebp - 0xb], dl
movzx edx, byte [esi + eax + 0x20]
xor dl, cl
or byte [ebp - 0xa], dl
movzx edx, byte [esi + eax + 0x40]
xor dl, cl
or byte [ebp - 9], dl
movzx edx, byte [esi + eax + 0x60]
xor dl, cl
or byte [ebp - 8], dl
movzx edx, byte [esi + eax + 0x80]
xor dl, cl
or byte [ebp - 7], dl
movzx edx, byte [esi + eax + 0xa0]
xor dl, cl
or byte [ebp - 6], dl
inc eax
dec edi
jne 0x51d5c0
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x1f]
mov cl, byte [ebp - 0xc]
mov dl, byte [ebp - 9]
and al, 0x7f
or byte [ebp - 0xb], al
or byte [ebp - 0xa], al
mov bl, al
or cl, al
xor al, 0x7f
or byte [ebp - 8], al
or byte [ebp - 7], al
movzx esi, byte [ebp - 7]
xor bl, 0x57
or dl, bl
mov bl, byte [ebp - 6]
or bl, al
movzx eax, bl
dec eax
dec esi
or eax, esi
movzx esi, byte [ebp - 8]
movzx edx, dl
dec edx
dec esi
or eax, esi
or eax, edx
movzx edx, byte [ebp - 0xa]
dec edx
or eax, edx
movzx edx, byte [ebp - 0xb]
movzx ecx, cl
dec edx
or eax, edx
dec ecx
or eax, ecx
mov ecx, dword [ebp - 4]
pop edi
shr eax, 8
pop esi
xor ecx, ebp
and eax, 1
pop ebx
call fcn.00531415
mov esp, ebp
pop ebp
ret
Function at 0x51e520
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, eax
lea ecx, [edx + 0x18]
lea eax, [esi + 8]
sub edx, esi
push edi
mov esi, 0x20
mov edi, dword [ecx - 0x18]
xor dword [eax - 8], edi
mov edi, dword [ecx - 0x14]
xor dword [eax - 4], edi
mov edi, dword [edx + eax]
xor dword [eax], edi
mov edi, dword [edx + eax + 4]
xor dword [eax + 4], edi
mov edi, dword [ecx - 8]
xor dword [eax + 8], edi
mov edi, dword [ecx - 4]
xor dword [eax + 0xc], edi
mov edi, dword [ecx]
xor dword [eax + 0x10], edi
mov edi, dword [ecx + 4]
xor dword [eax + 0x14], edi
add eax, 0x20
add ecx, 0x20
dec esi
jne 0x51e531
pop edi
pop esi
ret
Function at 0x5308eb
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x6b7c8c], 0
push ebx
push esi
mov esi, 0x6b7c94
jne 0x530917
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x6b7cac], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x6b7c8c], 1
push dword [0x6b7cac]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x5309b4
push 0x14
push 8
push dword [0x6b78c0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x5309de
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x6b7c90]
test eax, eax
je 0x530959
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x6b7c90], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x5309e3
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x6b7cac]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x6b78c0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x5309de
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8

Function at 0x5310e4
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x531123
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x531123
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x531123
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x531123
cmp dword [ecx + 0x74], 0xe
jbe 0x531123
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x535c5e
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push str.FlsAlloc
push 0x633e3c
push str.FlsAlloc
push 0x1f
call fcn.00535ac9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x535c92
push dword [ebp + 8]
mov ecx, esi
call dword [0x63340c]
call esi
jmp 0x535c98
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x535cdc
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push str.FlsGetValue
push 0x633e60
push str.FlsGetValue
push 0x21
call fcn.00535ac9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x535d13
push dword [ebp + 8]
mov ecx, esi
call dword [0x63340c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x535d1b
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push str.FlsSetValue
push 0x633e74
push str.FlsSetValue
push 0x22
call fcn.00535ac9
mov esi, eax
add esp, 0x10
test esi, esi
je 0x535d55
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x63340c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x53782b
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x5378c8
push ebx
push esi
call fcn.005377f4
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00537788
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x537875
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x5378c7
push edi
push eax
call fcn.005349e3
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x537895
call fcn.005349a9
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x5378c6
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00537788
add esp, 0x20
test eax, eax
jne 0x5378b4
push edi
call fcn.005349a9
jmp 0x5378bc
push ebx
call fcn.005349a9
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x5378cb
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x5378dc
pop esi
ret
push ebx
push edi
push esi
call fcn.005377f4
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.005349e3
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x537904
push ebx
push esi
push edi
call fcn.00541db0
add esp, 0xc
push 0
call fcn.005349a9
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x53805e
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00537b79

Function at 0x53b1f0
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.00535499
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x53b25f
cmp esi, dword [ebp - 4]
je 0x53b25a
cmp dword [ebp + 0xc], 0
je 0x53b25a
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x53b237
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0053ad42
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x53b261
xor eax, eax
inc eax
jmp 0x53b261
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x53b2c6
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x6b5a34]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.00535499
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00535499
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x53b33d
cmp word [ecx], dx
je 0x53b33d
mov eax, dword [0x63511c]
push edi
dec eax
push eax
push 0x635008
call fcn.0053b265
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x53b3b0
cmp word [eax], dx
je 0x53b3b0
mov eax, dword [edi]
test eax, eax
je 0x53b361
cmp word [eax], dx
je 0x53b361
lea eax, [ebp - 0x10]
push eax
call fcn.0053ac48
jmp 0x53b36a
lea eax, [ebp - 0x10]
push eax
call fcn.0053ace3
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x53b3da
mov eax, dword [0x635004]
push dword [ebp - 0x14]
dec eax
push eax
push 0x634cf8
call fcn.0053b265
add esp, 0xc
test al, al
je 0x53b3da
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x53b3a5
cmp word [eax], di
je 0x53b3a5
lea eax, [ebp - 0x10]
push eax
call fcn.0053ac48
pop ecx
jmp 0x53b3dc
lea eax, [ebp - 0x10]
push eax
call fcn.0053ace3
jmp 0x53b3a2
mov eax, dword [edi]
test eax, eax
je 0x53b3c7
cmp word [eax], dx
je 0x53b3c7
lea eax, [ebp - 0x10]
push eax
call fcn.0053abfd
pop ecx
jmp 0x53b3da
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x53b4a5
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0053b0ea
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x53b4a5
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x53b4a5
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x53b4a5
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x53b432
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.00535ef7
test ebx, ebx
je 0x53b4a0
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.00535ef7
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x53b4a5
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x53b4a5
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.0053d8a0
add esp, 0x10
xor eax, eax
inc eax
jmp 0x53b4a7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00531415
leave
ret
Function at 0x540c1c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x6b83e8]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x540c5c
cmp byte [ebx], 0xa
jne 0x540c5c
or byte [edi + eax + 0x28], 4
jmp 0x540c61
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x540d60
mov dl, byte [eax]
cmp dl, 0x1a
je 0x540d43
inc eax
cmp dl, 0xd
je 0x540c8d
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x540cb3
cmp eax, ecx
jae 0x540cc1
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x540c75
jmp 0x540d60
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x540d3e
cmp dword [ebp - 0x10], 0
je 0x540d3e
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x6b83e8]
test byte [eax + edi + 0x28], 0x48
je 0x540d18
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x540d03
mov byte [esi], dl
jmp 0x540d14
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x6b83e8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x540d60
cmp byte [ebp - 1], 0xa
jne 0x540d27
cmp esi, ebx
jne 0x540d27
mov byte [esi], 0xa
jmp 0x540d5f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00540a21
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x540d60
mov byte [esi], 0xd
jmp 0x540d5f
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x6b83e8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x540d5d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x540d60
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x540d69
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x6b83e8]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x540daf
cmp word [ebx], dx
jne 0x540daf
or byte [eax + edi + 0x28], 4
jmp 0x540db4
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x540f17
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x540ef7
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x540df5
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x540e2b
cmp eax, edx
jae 0x540e39
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x540dd0
jmp 0x540f17
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x540ef2
cmp dword [ebp - 0x18], 0
je 0x540ef2
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x6b83e8]
test byte [eax + edi + 0x28], 0x48
je 0x540ec8
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x540e8c
mov word [esi], cx
jmp 0x540ec3
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x6b83e8]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x6b83e8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x6b83e8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x540f17
pop eax
cmp word [ebp - 4], ax
jne 0x540ed8
cmp esi, ebx
jne 0x540ed8
mov word [esi], ax
jmp 0x540f14
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00540a21
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x540f17
push 0xd
pop eax
jmp 0x540ed3
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x6b83e8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x540f11
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x540f17
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret