joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4c29bc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [0x6401e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
movups xmm0, xmmword [edx]
movups xmmword [ebp - 0x30], xmm0
mov esi, dword [ecx + 0x1c]
mov ebx, dword [ecx + 0x20]
movups xmmword [ebp - 0x20], xmm0
cmp esi, ebx
je 0x4c2a12
mov dword [ebp - 0x34], ecx
lea edi, [ebp - 0x20]
mov ecx, esi
push edi
call fcn.004c5ef0
test al, al
jne 0x4c29ff
add esi, 0x58
cmp ebx, esi
jne 0x4c29ea
mov esi, ebx
mov eax, dword [ebp - 0x34]
cmp esi, dword [eax + 0x20]
je 0x4c2a12
cmp byte [esi + 0x1b], 0
jns 0x4c2a17
mov eax, dword [esi + 0x10]
jmp 0x4c2a1a
xor edi, edi
inc edi
jmp 0x4c2a3d
lea eax, [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
shr ecx, 3
and ecx, 2
xor edi, edi
inc edi
cmp eax, 0xffffffff
cmovne edi, ecx
test edi, edi
jne 0x4c2a3d
mov eax, dword [ebp + 8]
mov dword [eax], esi
xor edi, edi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00596351
mov eax, edi
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4c3c4c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx + 0x50]
cmp eax, edx
jne 0x4c3c61
cmp byte [ecx + 0x1b], 0
jns 0x4c3c6f
mov ecx, dword [ecx + 0x10]
jmp 0x4c3c72
xor ecx, ecx
cmp eax, 1
sete cl
lea eax, [ecx + ecx*2]
inc eax
jmp 0x4c3c8c
add ecx, 0x10
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
mov edx, eax
shr edx, 3
and edx, 2
xor eax, eax
inc eax
cmp ecx, 0xffffffff
cmovne eax, edx
pop ebp
ret
Function at 0x4d4260
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x50
mov esi, ecx
mov eax, dword [0x6401e4]
xor eax, ebp
mov dword [esp + 0x48], eax
mov edi, esp
push 0x1b
push str..._.._base_files_memory_mapped_file_win.cc
push str.MapImageToMemory
push edi
call fcn.004835b0
add esp, 0x10
lea ecx, [esp + 0x10]
push 0
push edi
call fcn.004d4910
mov ecx, esi
call fcn.00455da0
test al, al
je 0x4d4323
mov ecx, esi
call fcn.0042d0e0
sub esp, 0x18
movaps xmm0, xmmword [0x5d5620]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
cmp dword [esi + 0x24], eax
je 0x4d431b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [esi + 0x24]
add eax, 1
cmp eax, 2
jb 0x4d42ff
call fcn.004835e0
push dword [esi + 0x24]
call fcn.00498c60
add esp, 4
mov dword [esi + 0x24], 0
mov eax, edi
add eax, 1
cmp eax, 2
jb 0x4d4311
mov dword [esi + 0x24], edi
call fcn.004835e0
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [esi + 0x24]
lea eax, [edi + 1]
cmp eax, 2
jae 0x4d4345
xor ebx, ebx
lea ecx, [esp + 0x10]
call fcn.004d4a30
mov ecx, dword [esp + 0x48]
xor ecx, ebp
call fcn.00596351
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 4
sub esp, 0x14
movaps xmm0, xmmword [0x5d5630]
movups xmmword [esp + 4], xmm0
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x1c], eax
test eax, eax
je 0x4d4323
mov dword [esp], 0x5cfdb4
mov dword [esp + 4], eax
mov ecx, esp
call fcn.004edad4
mov eax, dword [eax + 0x50]
mov dword [esi + 0x20], eax
mov bl, 1
jmp 0x4d4325
Function at 0x4d4380
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x60
mov esi, ecx
mov eax, dword [0x6401e4]
xor eax, ebp
mov dword [esp + 0x58], eax
lea edi, [esp + 0x10]
push 0x3a
push str..._.._base_files_memory_mapped_file_win.cc
push str.MapFileRegionToMemory
push edi
call fcn.004835b0
add esp, 0x10
lea ecx, [esp + 0x20]
push 0
push edi
call fcn.004d4910
mov ecx, esi
call fcn.00455da0
xor ebx, ebx
test al, al
je 0x4d447e
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmp eax, 3
ja case.default.0x4d43da
jmp dword [eax*4 + 0x5d5694]
mov edi, 2
jmp 0x4d4409
mov edi, 4
jmp 0x4d4409
mov ebx, dword [ecx + 8]
mov edi, 4
jmp 0x4d4409
sub esp, 4
mov ecx, esi
call fcn.004d4260
mov ebx, eax
jmp 0x4d447e
xor edi, edi
mov ecx, esi
call fcn.0042d0e0
push 0
push ebx
push 0
push edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
mov eax, dword [esi + 0x24]
cmp eax, ebx
je 0x4d4474
mov dword [esp + 4], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esi + 0x24]
add eax, 1
cmp eax, 2
jb 0x4d4456
call fcn.004835e0
push dword [esi + 0x24]
call fcn.00498c60
add esp, 4
mov dword [esi + 0x24], 0
lea eax, [ebx + 1]
cmp eax, 2
jb 0x4d4466
mov dword [esi + 0x24], ebx
call fcn.004835e0
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x24]
mov edi, dword [esp + 4]
add eax, 1
cmp eax, 2
jae 0x4d449e
xor ebx, ebx
lea ecx, [esp + 0x20]
call fcn.004d4a30
mov ecx, dword [esp + 0x58]
xor ecx, ebp
call fcn.00596351
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 8
mov dword [esp + 0xc], 0
mov ebx, dword [ebp + 8]
mov ecx, ebx
push 0x5d56a8
call fcn.004d45d0
test al, al
je 0x4d44db
mov ecx, esi
call fcn.004948f0
xor ebx, ebx
cmp eax, 1
mov ecx, edx
sbb ecx, 0
jl 0x4d447e
test edx, edx
jne 0x4d447e
mov dword [esi + 0x20], eax
xor ecx, ecx
xor eax, eax
xor edx, edx
jmp 0x4d4536
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0
lea eax, [esp + 0xc]
lea ecx, [esp + 8]
push eax
push ecx
lea eax, [esp + 0x18]
push eax
push dword [ebx + 8]
push dword [ebx + 4]
push dword [ebx]
call fcn.004d4720
add esp, 0x18
mov eax, dword [esp + 0x14]
test eax, eax
js 0x4d447c
mov dword [esp + 4], edi
mov edi, dword [ebx + 8]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
add edx, edi
mov dword [esi + 0x20], edi
mov edi, dword [esp + 4]
and edi, 2
add edi, 2
push edx
push ecx
push eax
push edi
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x1c], eax
test eax, eax
je 0x4d447c
add eax, dword [esp + 0xc]
mov dword [esi + 0x1c], eax
mov bl, 1
jmp 0x4d447e
Function at 0x4d9030
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x644390]
mov ecx, dword [0x644310]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 0x18]
jg 0x4d905b
mov ecx, 0x644388
pop ebp
jmp fcn.0048e6e0
push 0x644390
call fcn.00596397
add esp, 4
cmp dword [0x644390], 0xffffffff
jne 0x4d9050
mov dword [0x64438c], 0
mov dword [0x644388], 0
mov ecx, 0x644388
push 0
call fcn.0048e750
push 0x644390
call fcn.0059640d
add esp, 4
jmp 0x4d9050
Function at 0x4eb080
Capabilities:
Encode data using xor
Hash data using murmur2

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov dword [ebp - 0x14], ecx
mov esi, dword [ebp + 0xc]
movzx edx, byte [esi + 0xb]
mov eax, dword [esi]
mov ecx, dword [esi + 4]
test dl, dl
mov dword [ebp - 0x10], ecx
lea ecx, [eax + ecx]
mov dword [ebp - 0x20], edx
lea edx, [esi + edx]
cmovs edx, ecx
cmovs esi, eax
sub edx, esi
cmp edx, 4
jb 0x4eb0ed
mov ecx, esi
mov eax, edx
nop word [eax + eax]
imul edi, dword [ecx], 0x5bd1e995
mov ebx, edi
shr ebx, 0x18
xor ebx, edi
imul edi, ebx, 0x5bd1e995
imul eax, eax, 0x5bd1e995
xor eax, edi
add ecx, 4
add edx, 0xfffffffc
cmp edx, 3
ja 0x4eb0c0
cmp edx, 1
jne 0x4eb0f6
jmp 0x4eb112
mov eax, edx
mov ecx, esi
cmp edx, 1
je 0x4eb112
cmp edx, 2
je 0x4eb109
cmp edx, 3
jne 0x4eb11d
movzx edx, byte [ecx + 2]
shl edx, 0x10
xor eax, edx
movzx edx, byte [ecx + 1]
shl edx, 8
xor eax, edx
movzx ecx, byte [ecx]
xor ecx, eax
imul eax, ecx, 0x5bd1e995
mov ecx, dword [ebp - 0x14]
mov edi, dword [ecx + 4]
xor ecx, ecx
test edi, edi
je 0x4eb278
mov edx, eax
shr edx, 0xd
xor edx, eax
imul eax, edx, 0x5bd1e995
mov ebx, eax
shr ebx, 0xf
xor ebx, eax
mov eax, edi
shr eax, 1
and eax, 0x55555555
mov edx, edi
sub edx, eax
mov eax, edx
and eax, 0x33333333
shr edx, 2
and edx, 0x33333333
add edx, eax
mov eax, edx
shr eax, 4
add eax, edx
and eax, 0xf0f0f0f
imul eax, eax, 0x1010101
shr eax, 0x18
mov dword [ebp - 0x28], eax
cmp eax, 1
ja 0x4eb184
lea edx, [edi - 1]
and edx, ebx
jmp 0x4eb190
mov edx, ebx
cmp ebx, edi
jb 0x4eb190
mov eax, ebx
xor edx, edx
div edi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x24], edx
mov eax, dword [eax + edx*4]
test eax, eax
je 0x4eb278
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], edi
mov ebx, dword [eax]
test ebx, ebx
je 0x4eb278
mov eax, dword [ebp - 0x18]
add eax, 0xffffffff
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x20]
test cl, cl
mov eax, dword [ebp - 0x10]
cmovns eax, ecx
mov dword [ebp - 0x10], eax
jmp 0x4eb1e6
and eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x24]
jne 0x4eb276
mov ebx, dword [ebx]
test ebx, ebx
je 0x4eb276
mov eax, dword [ebx + 4]
cmp dword [ebp - 0x14], eax
jne 0x4eb240
movzx eax, byte [ebx + 0x13]
mov ecx, eax
test al, al
jns 0x4eb1fb
mov ecx, dword [ebx + 0xc]
cmp ecx, dword [ebp - 0x10]
jne 0x4eb1dc
lea ecx, [ebx + 8]
mov edx, dword [ecx]
test al, al
cmovs ecx, edx
js 0x4eb258
cmp dword [ebp - 0x10], 0
je 0x4eb272
cmp byte [esi], dl
jne 0x4eb1dc
add eax, 0xffffffff
xor ecx, ecx
nop dword [eax + eax]
cmp eax, ecx
je 0x4eb272
movzx edx, byte [ebx + ecx + 9]
lea edi, [ecx + 1]
cmp dl, byte [esi + ecx + 1]
mov ecx, edi
je 0x4eb220
jmp 0x4eb1dc
cmp dword [ebp - 0x28], 1
jbe 0x4eb1d0
mov ecx, dword [ebp - 0x18]
cmp eax, ecx
jb 0x4eb1d3
xor edx, edx
div ecx
mov eax, edx
jmp 0x4eb1d3
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4eb272
push eax
push esi
push ecx
call fcn.00598d2d
add esp, 0xc
test eax, eax
jne 0x4eb1dc
mov ecx, ebx
jmp 0x4eb278
xor ecx, ecx
mov eax, dword [ebp + 8]
mov dword [eax], ecx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret 8
Function at 0x4edb18
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + 0x3c]
movzx edx, word [ecx + eax + 6]
test edx, edx
je 0x4edb65
add eax, ecx
movzx esi, word [eax + 0x14]
lea edi, [eax + esi]
add edi, 0x18
xor ebx, ebx
xor esi, esi
test edi, edi
je 0x4edb65
mov eax, dword [edi + ebx + 0xc]
test eax, eax
je 0x4edb52
add eax, ecx
cmp eax, dword [ebp + 8]
jbe 0x4edb54
jmp 0x4edb5d
xor eax, eax
add eax, dword [edi + ebx + 8]
cmp eax, dword [ebp + 8]
ja 0x4edb6e
inc esi
add ebx, 0x28
cmp esi, edx
jb 0x4edb3d
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret 4
add edi, ebx
mov eax, edi
jmp 0x4edb67

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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x10
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x4edcfc
mov ebx, ecx
mov eax, dword [ecx + 4]
mov edx, dword [eax + 0x3c]
cmp dword [eax + edx + 0x74], 0
je 0x4edcfc
cmp word [eax + edx + 0x14], 0x68
jb 0x4edcfc
mov esi, dword [ebx]
mov ecx, ebx
push dword [eax + edx + 0x78]
call dword [esi + 4]
test eax, eax
je 0x4edcfc
mov esi, eax
mov eax, dword [ebp + 8]
cmp eax, 0xffff
ja 0x4edc74
mov word [edi], ax
jmp 0x4edd29
mov eax, dword [ebx]
mov ecx, ebx
push dword [esi + 0x20]
call dword [eax + 4]
mov edx, eax
mov eax, dword [esi + 0x18]
lea ecx, [eax*4]
test ecx, ecx
je 0x4edcfc
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], ebx
lea edi, [edx + eax*4]
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], edx
mov ebx, edx
mov eax, edi
sub eax, ebx
mov ecx, eax
sar ecx, 2
shr eax, 0x1f
add eax, ecx
and eax, 0xfffffffe
lea esi, [ebx + eax*2]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
push dword [esi]
call dword [eax + 4]
mov ecx, dword [ebp + 8]
mov cl, byte [ecx]
test cl, cl
je 0x4edcd9
mov edx, dword [ebp - 0x1c]
cmp cl, byte [eax]
jne 0x4edcdb
inc eax
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x4edccd
xor ecx, ecx
movzx ecx, cl
movzx eax, byte [eax]
mov edx, ecx
sub edx, eax
test edx, edx
lea edx, [esi + 4]
cmovg ebx, edx
cmovle edi, esi
cmp ecx, eax
je 0x4edd08
xor eax, eax
cmp ebx, edi
jne 0x4edca3
jmp 0x4edcfe
xor eax, eax
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret 8
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
mov edi, dword [ebp - 0x18]
push dword [edi + 0x24]
call dword [eax + 4]
sub esi, dword [ebp - 0x14]
sar esi, 1
movzx eax, word [eax + esi]
add ax, word [edi + 0x10]
mov ecx, dword [ebp + 0xc]
mov word [ecx], ax
mov al, 1
jmp 0x4edcfe
Function at 0x4fc440
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [eax + 8]
pop ebp
jmp 0x4fc451
test edx, edx
jle 0x4fc4bb
push ebp
mov ebp, esp
push ebx
push edi
push esi
xor eax, eax
movdqa xmm0, xmmword [0x5c7b10]
movdqa xmm1, xmmword [0x5dc8c0]
mov esi, edx
xor edi, edi
mov ebx, dword [ecx + eax*4]
movd xmm2, ebx
shr ebx, 0x1f
add edi, ebx
pshufd xmm2, xmm2, 0
pxor xmm2, xmm0
pcmpgtd xmm2, xmm1
movdqa xmm3, xmm2
psrld xmm3, 0x1f
pshufd xmm3, xmm3, 0xee
psubd xmm3, xmm2
pshufd xmm2, xmm3, 0x55
paddd xmm2, xmm3
movd ebx, xmm2
add esi, ebx
inc eax
cmp edx, eax
jne 0x4fc471
lea eax, [edi + edi*4]
mov edx, esi
pop esi
pop edi
pop ebx
pop ebp
jmp 0x4fc4bd
xor eax, eax
add eax, edx
ret

Function at 0x504960
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov ebx, ecx
mov eax, dword [0x6401e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea edi, [ebp - 0x1c]
mov dword [ebp - 0x24], edx
push edx
push ecx
push edi
call fcn.0048c140
add esp, 0xc
cmp byte [ebp - 0x11], 0
jns 0x50498f
mov edi, dword [ebp - 0x1c]
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
cmp byte [ebp - 0x11], 0
jns 0x5049ad
push dword [ebp - 0x1c]
call fcn.00596316
add esp, 4
cmp dword [ebp + 8], 0
je 0x504a8c
test esi, esi
je 0x504a8c
mov dword [ebp - 0x20], esi
add esi, esi
mov ecx, 0xffffffff
cmovae ecx, esi
push ecx
call fcn.00596343
add esp, 4
mov edi, eax
lea esi, [ebp - 0x1c]
push dword [ebp - 0x24]
push ebx
push esi
call fcn.0048c140
add esp, 0xc
cmp byte [ebp - 0x11], 0
jns 0x5049f0
mov esi, dword [ebp - 0x1c]
push dword [ebp - 0x20]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp byte [ebp - 0x11], 0
jns 0x504a0c
push dword [ebp - 0x1c]
call fcn.00596316
add esp, 4
cmp word [edi], 0
mov esi, dword [ebp + 8]
je 0x504a2f
xor ecx, ecx
nop word [eax + eax]
lea eax, [ecx + 1]
cmp word [edi + ecx*2 + 2], 0
mov ecx, eax
jne 0x504a20
jmp 0x504a31
xor eax, eax
lea ecx, [ebp - 0x1c]
push eax
push edi
push ecx
call fcn.0048c5c0
add esp, 0xc
cmp byte [esi + 0xb], 0
js 0x504a4e
mov byte [esi], 0
mov byte [esi + 0xb], 0
jmp 0x504a71
mov eax, dword [esi]
mov byte [eax], 0
mov dword [esi + 4], 0
cmp byte [esi + 0xb], 0
jns 0x504a71
push dword [esi]
call fcn.00596316
add esp, 4
mov dword [esi + 8], 0
mov eax, dword [ebp - 0x14]
mov dword [esi + 8], eax
movsd xmm0, qword [ebp - 0x1c]
movsd qword [esi], xmm0
push edi
call fcn.0059634c
add esp, 4
mov esi, dword [ebp - 0x20]
test esi, esi
setne bl
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00596351
mov eax, ebx
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x504e70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 8
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov esi, dword [0x6401e4]
xor esi, ebp
mov dword [ebp - 8], esi
mov esi, SysReAllocString
cmp edx, esi
cmovb esi, edx
lea edx, [ebp - 0xc]
push 0
push edx
push esi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x504eb3
mov esi, dword [ebp - 0xc]
cmp esi, 0xffffffff
jne 0x504eb6
int3
xor esi, esi
dec esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00596351
mov eax, esi
add esp, 8
pop esi
pop ebp
ret

Function at 0x504ec8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov ecx, dword [0x6401e4]
xor ecx, ebp
mov dword [ebp - 0x10], ecx
mov esi, SysReAllocString
cmp eax, esi
cmovb esi, eax
lea eax, [ebp - 0x14]
push 0
push eax
push esi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x504f2e
mov eax, dword [sym.imp.KERNEL32.dll_GetFileType]
mov ebx, dword [ebp - 0x14]
test ebx, ebx
jne 0x504f40
push edi
mov ebx, eax
call eax
cmp eax, 3
jne 0x504f59
push 0
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov eax, ebx
jne 0x504f06
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
cmp eax, 0x6d
setne bl
neg ebx
jmp 0x504f45
cmp ebx, 0xffffffff
je 0x504f5e
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00596351
mov eax, ebx
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [ebp - 0x14]
jmp 0x504f45
int3

Function at 0x505507
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
sub esp, 0xb0
mov esi, dword [ebp + 8]
mov eax, dword [0x6401e4]
xor eax, ebp
mov dword [ebp - 0xc], eax
xor ebx, ebx
push ebx
push ebx
push ebx
push esi
call fcn.0050541c
add esp, 0x10
or edx, eax
jne 0x50558a
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov bl, 1
test eax, eax
jne 0x50558a
push 2
call fcn.00483a10
add esp, 4
test al, al
je 0x505588
call fcn.00484390
lea esi, [ebp - 0xb8]
mov ecx, esi
push eax
push 2
push 0xf4
push str..._.._third_party_crashpad_crashpad_util_file_file_io_win.cc
call fcn.004844c0
lea eax, [ebp - 0xb0]
push 0xc
push 0x5dcfb2
push eax
call fcn.00401baa
add esp, 0xc
mov ecx, esi
call fcn.00484570
xor ebx, ebx
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.00596351
mov eax, ebx
add esp, 0xb0
pop esi
pop ebx
pop ebp
ret
Function at 0x505bfa
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xbc
mov edi, dword [ebp + 8]
mov eax, dword [0x6401e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp byte [edi + 0xb], 0
mov eax, edi
jns 0x505c1d
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x505c46
mov ebx, eax
bt eax, 0xa
jae 0x505c3b
cmp byte [ebp + 0xc], 0
je 0x505cec
and ebx, 0x10
shr ebx, 4
jmp 0x505cee
push 2
call fcn.00483a10
add esp, 4
test al, al
je 0x505cec
call fcn.00484390
lea ecx, [ebp - 0xbc]
push eax
push 2
push 0x81
push str..._.._third_party_crashpad_crashpad_util_file_filesystem_win.cc
call fcn.004844c0
lea eax, [ebp - 0xb4]
push 0x12
push str.GetFileAttributes
push eax
call fcn.00401baa
add esp, 0xc
mov esi, eax
movzx eax, byte [edi + 0xb]
test al, al
jns 0x505c9a
mov eax, dword [edi + 4]
mov edi, dword [edi]
lea ebx, [ebp - 0xc8]
push eax
push edi
push ebx
call fcn.0048c5c0
add esp, 0xc
movzx eax, byte [ebx + 0xb]
test al, al
jns 0x505cbf
mov eax, dword [ebp - 0xc4]
mov ebx, dword [ebp - 0xc8]
push eax
push ebx
push esi
call fcn.00401baa
add esp, 0xc
cmp byte [ebp - 0xbd], 0
jns 0x505ce1
push dword [ebp - 0xc8]
call fcn.00596316
add esp, 4
lea ecx, [ebp - 0xbc]
call fcn.00484570
xor ebx, ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00596351
mov eax, ebx
add esp, 0xbc
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x505d05
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xbc
mov edi, dword [ebp + 8]
mov eax, dword [0x6401e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp byte [edi + 0xb], 0
mov eax, edi
jns 0x505d28
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov bl, 1
test eax, eax
jne 0x505e90
cmp byte [ebp + 0x10], 0
je 0x505dfa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x505dfa
push 1
push edi
call fcn.00505bfa
add esp, 8
test al, al
jne 0x505e90
push 2
call fcn.00483a10
add esp, 4
test al, al
je 0x505e8e
lea ecx, [ebp - 0xc8]
push 2
push 0x5c
push str..._.._third_party_crashpad_crashpad_util_file_filesystem_win.cc
call fcn.00483ab0
movzx eax, byte [edi + 0xb]
test al, al
jns 0x505d9c
mov eax, dword [edi + 4]
mov edi, dword [edi]
lea esi, [ebp - 0xc0]
lea ebx, [ebp - 0x1c]
push eax
push edi
push ebx
call fcn.0048c5c0
add esp, 0xc
movzx eax, byte [ebx + 0xb]
test al, al
jns 0x505dbe
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
push eax
push ebx
push esi
call fcn.00401baa
add esp, 0xc
push 0x10
push str._not_a_directory
push eax
call fcn.00401baa
add esp, 0xc
cmp byte [ebp - 0x11], 0
jns 0x505dea
push dword [ebp - 0x1c]
call fcn.00596316
add esp, 4
lea ecx, [ebp - 0xc8]
call fcn.00483e50
jmp 0x505e8e
push 2
call fcn.00483a10
add esp, 4
test al, al
je 0x505e8e
call fcn.00484390
lea ecx, [ebp - 0xc8]
push eax
push 2
push 0x61
push str..._.._third_party_crashpad_crashpad_util_file_filesystem_win.cc
call fcn.004844c0
lea eax, [ebp - 0xc0]
push 0x10
push str.CreateDirectory
push eax
call fcn.00401baa
add esp, 0xc
mov esi, eax
movzx eax, byte [edi + 0xb]
test al, al
jns 0x505e4b
mov eax, dword [edi + 4]
mov edi, dword [edi]
lea ebx, [ebp - 0x1c]
push eax
push edi
push ebx
call fcn.0048c5c0
add esp, 0xc
movzx eax, byte [ebx + 0xb]
test al, al
jns 0x505e67
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
push eax
push ebx
push esi
call fcn.00401baa
add esp, 0xc
cmp byte [ebp - 0x11], 0
jns 0x505e83
push dword [ebp - 0x1c]
call fcn.00596316
add esp, 4
lea ecx, [ebp - 0xc8]
call fcn.00484570
xor ebx, ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00596351
mov eax, ebx
add esp, 0xbc
pop esi
pop edi
pop ebx
pop ebp
ret