joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5071d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x609088
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x14], esi
mov eax, dword [ebp + 8]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push eax
mov dword [esp + 0x54], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x507277
call fcn.0040f010
cmp eax, ebx
jl 0x507262
mov eax, dword [ebp + 0xc]
push ebx
lea ecx, [esp + 0x2c]
push ecx
push eax
push esi
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x50727f
call fcn.0040f010
cmp eax, ebx
jge 0x50727f
cmp esi, ebx
je 0x507262
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, eax
mov dword [esp + 0x14], esi
jmp 0x507230
push ebx
lea edx, [esp + 0x20]
push edx
push 4
lea eax, [esp + 0x24]
push eax
push esi
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
jne 0x507382
call fcn.0040f010
cmp eax, ebx
jl 0x507257
mov eax, dword [esp + 0x18]
cmp eax, 0x2000
ja 0x507257
mov dword [esp + 0x20], ebx
push eax
lea ecx, [esp + 0x24]
push ecx
mov byte [esp + 0x40], 1
call fcn.00415030
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
mov ecx, edi
lea edx, [esp + 0x14]
call fcn.00417460
cmp eax, ebx
jl 0x50735b
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x50735b
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], ebx
push eax
lea edx, [esp + 0x28]
push edx
mov byte [esp + 0x40], 2
call fcn.00415030
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.00492d60
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x2c]
add esp, 4
push eax
push ecx
mov ecx, esi
mov edx, edi
call fcn.00492ac0
add esp, 0xc
cmp eax, ebx
jne 0x507392
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push ecx
mov dword [esp + 0x24], edx
call fcn.00495d40
mov ecx, dword [esp + 0x20]
add esp, 4
push eax
push ecx
mov ecx, esi
mov edx, edi
call fcn.00492ac0
add esp, 0xc
cmp eax, ebx
jne 0x507392
push esi
call fcn.005d28c2
add esp, 4
push edi
call fcn.005d28c2
add esp, 4
lea esi, [esp + 0x14]
call fcn.0044b230
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x1c], 4
jne 0x507257
jmp 0x5072a8
mov eax, dword [esp + 0x1c]
cmp eax, dword [ebp + 0x14]
ja 0x507352
mov edx, dword [ebp + 0x10]
push eax
push esi
push edx
call fcn.005d8ed0
add esp, 0xc
push esi
call fcn.005d28c2
add esp, 4
push edi
call fcn.005d28c2
add esp, 4
lea esi, [esp + 0x14]
call fcn.0044b230
mov eax, 1
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x5073e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5f9d40
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov edi, ecx
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x20], esi
mov eax, dword [ebp + 8]
push ebx
push 0x80
push 4
push ebx
push 1
push 0x40000000
push eax
mov dword [esp + 0x4c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x507489
call fcn.0040f010
cmp eax, ebx
jl 0x507474
mov eax, dword [ebp + 0xc]
push ebx
lea ecx, [esp + 0x1c]
push ecx
push eax
push esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x507491
call fcn.0040f010
cmp eax, ebx
jge 0x507491
cmp esi, ebx
je 0x507474
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, eax
mov dword [esp + 0x20], esi
jmp 0x507442
lea ecx, [edi + 0xa]
mov eax, ecx
and eax, reloc.OLEAUT32.dll_VariantInit
jns 0x5074a2
dec eax
or eax, 0xfffffff8
inc eax
je 0x5074ad
mov edx, 8
sub edx, eax
mov eax, edx
add eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
push eax
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x38], 1
call fcn.00415030
call fcn.00492d60
mov ecx, dword [ebp + 0x10]
push eax
push edi
mov edi, dword [esp + 0x1c]
push ecx
lea ecx, [esp + 0x1c]
mov edx, edi
call fcn.004927b0
add esp, 0xc
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x24]
push edx
push 4
lea eax, [esp + 0x1c]
push eax
push esi
call ebx
test eax, eax
jne 0x507534
call fcn.0040f010
test eax, eax
jge 0x507534
push edi
call fcn.005d28c2
add esp, 4
test esi, esi
je 0x507474
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x24]
push ecx
push edx
push edi
push esi
call ebx
test eax, eax
jne 0x507551
call fcn.0040f010
test eax, eax
jl 0x507507
push edi
call fcn.005d28c2
add esp, 4
test esi, esi
je 0x507565
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x507580
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
push edi
xor esi, esi
push esi
push 0x80
push 4
push esi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x507644
call fcn.0040f010
test eax, eax
jl 0x50763c
push 0
lea ecx, [esp + 0x10]
push ecx
push 0x800
push esi
mov dword [esp + 0x18], 0x800
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x5075e5
call fcn.0040f010
test eax, eax
jl 0x507631
push 0x64
lea edx, [esp + 0xc]
push edx
mov dword [esp + 0x10], 0
call fcn.00415030
mov edi, dword [esp + 8]
push 0x64
push 0
push edi
call fcn.005da970
add esp, 0xc
push 0
lea eax, [esp + 0xc]
push eax
push 0x64
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x50764b
call fcn.0040f010
test eax, eax
jge 0x50764b
push edi
call fcn.005d28c2
add esp, 4
test esi, esi
je 0x50763c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
add esp, 0xc
ret
mov esi, eax
jmp 0x5075b4
push edi
call fcn.005d28c2
add esp, 4
test esi, esi
je 0x50765f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, 1
pop esi
add esp, 0xc
ret

Function at 0x5080c0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x605e1b
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
push 0x34
call fcn.005d2776
mov esi, eax
add esp, 4
mov dword [esp + 8], esi
xor eax, eax
cmp esi, eax
mov dword [esp + 0x14], eax
je 0x508123
lea edx, [esi + 8]
lea ecx, [edi + 0x30]
push edx
mov dword [esi], ecx
mov dword [esi + 4], eax
call fcn.00470890
mov dword [edi + 0x3c], esi
mov eax, esi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x10
ret
mov dword [edi + 0x3c], eax
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x10
ret
Function at 0x508790
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x609048
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x64]
mov dword fs:[0], eax
call fcn.00495d40
mov ecx, dword [eax]
mov dword [esp + 0x4c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x50], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x54], ecx
mov edx, dword [eax + 0xc]
push 4
xor ebx, ebx
push str.GUID
lea ecx, [esp + 0x14]
mov dword [esp + 0x60], edx
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], ebx
mov byte [esp + 0x18], bl
call fcn.00402990
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x10]
mov dword [esp + 0x70], ebx
lea eax, [esp + 0x50]
mov edi, 0x10
push edx
mov ecx, esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], eax
call fcn.00473250
mov dword [esp + 0x6c], 0xffffffff
cmp dword [esp + 0x24], edi
jb 0x508843
mov eax, dword [esp + 0x10]
push eax
call fcn.005d2367
add esp, 4
push 3
push 0x629e74
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], ebx
mov byte [esp + 0x18], bl
call fcn.00402990
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x6c], 1
mov edx, dword [ecx + 0x11cc]
push edx
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.004733a0
mov dword [esp + 0x6c], 0xffffffff
cmp dword [esp + 0x24], edi
jb 0x50889d
mov ecx, dword [esp + 0x10]
push ecx
call fcn.005d2367
add esp, 4
push 7
push str.Version
lea ecx, [esp + 0x38]
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
call fcn.00402990
push 0x454
lea edx, [esp + 0x34]
push edx
mov ecx, esi
mov dword [esp + 0x74], 2
call fcn.004733a0
cmp dword [esp + 0x48], edi
jb 0x5088e9
mov eax, dword [esp + 0x34]
push eax
call fcn.005d2367
add esp, 4
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.005d28b3
add esp, 0x64
ret 4
Function at 0x508910
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x60029b
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x90], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0xa8]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xb8]
lea eax, [ebp + 0xdc0]
xor edi, edi
push eax
lea ebx, [esp + 0x1c]
mov dword [esp + 0x1c], edi
call fcn.004712f0
mov edx, dword [ebp + 0x11cc]
xor ecx, ecx
mov dword [esp + 0x84], ecx
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], ecx
mov ecx, dword [esp + 0xbc]
mov dword [esp + 0x94], ecx
mov ecx, dword [ebp + 0x11d0]
mov dword [esp + 0x78], ecx
add ecx, 1
mov dword [ebp + 0x11d0], ecx
mov ecx, dword [ebp + 0xdbc]
mov dword [esp + 0x98], edx
lea edx, [eax + ecx + 0x36]
lea esi, [esp + 0x70]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x70], 0x65
mov dword [esp + 0x74], 0x12dd668
mov dword [esp + 0x7c], 1
mov dword [esp + 0x9c], edi
mov dword [esp + 0xa0], edi
mov dword [esp + 0x80], edx
call fcn.0046c8a0
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], 0x80
mov dword [esp + 0xb0], edi
mov ecx, 0xd
lea edi, [esp + 0x3c]
lea eax, [esp + 0x3c]
rep movsd dword es:[edi], dword [esi]
push eax
mov ebx, 0x34
lea esi, [esp + 0x28]
call fcn.0044b8f0
movzx ecx, word [ebp + 0xdbc]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
movzx edx, ax
lea eax, [esp + 0x20]
push eax
mov ebx, 2
mov dword [esp + 0x24], edx
call fcn.0044b8f0
mov ebx, dword [ebp + 0xdbc]
lea ecx, [ebp + 0x9bc]
push ecx
call fcn.0044b8f0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x508a81
mov ebx, dword [esp + 0x1c]
test ebx, ebx
jbe 0x508a81
push eax
call fcn.0044b8f0
mov edx, dword [ebp]
mov edx, dword [edx + 0x54]
lea eax, [esp + 0x24]
push eax
mov ecx, ebp
call edx
lea esi, [esp + 0x70]
mov edi, eax
call fcn.0046c900
test edi, edi
jne 0x508ac0
mov eax, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x98]
call fcn.00508370
push eax
push 0x637b08
call fcn.0040b2a0
add esp, 0xc
jmp 0x508b08
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x94]
push edi
push ecx
call fcn.00508370
push eax
push 0x637b2c
call fcn.0040b2a0
mov edx, dword [ebp + 0x10c]
add esp, 0x10
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x508b00
mov eax, dword [ebp + 0x10c]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
jmp 0x508b08
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x508b19
push eax
call fcn.005d27e0
add esp, 4
mov ecx, dword [esp + 0xa8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.005d28b3
add esp, 0xa0
ret 8
Function at 0x509010
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x5f9cd8
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
lea edi, [esp + 0xc]
call fcn.0047ac70
mov dword [esp + 0x18], 0
mov edx, dword [esp + 0xc]
mov eax, dword [edx - 0xc]
test eax, eax
jle 0x509073
lea ecx, [eax - 1]
test ecx, ecx
jl 0x5090ee
cmp ecx, eax
jg 0x5090ee
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x509073
push 0x5c
call fcn.0040af90
push 0xb
push str.LevelPoint_
lea eax, [esp + 0x14]
push eax
call fcn.0040aee0
mov esi, dword [esp + 0xc]
push 0
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea eax, [esp + 0xc]
mov edi, ebx
call fcn.0040ab90
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0x11cc]
push edx
push str.level__u.dat
call fcn.0040e190
lea eax, [esi - 0x10]
add esp, 8
mov dword [esp + 0x18], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5090da
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x10
ret 4
push 0x80070057
call fcn.00403650
int3
Function at 0x50d500
Capabilities:
Terminate process

Disassembly:
mov ecx, dword [esp + 4]
lea eax, [esp + 8]
push eax
push ecx
call fcn.005d8125
add esp, 8
push 1
call fcn.005d856e
int3

Function at 0x50dcc0
Capabilities:
Get file size

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
push edi
mov ebx, eax
lea eax, [esp + 0x14]
push eax
xor edi, edi
push ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x10]
cmp ecx, 0xffffffff
jne 0x50dd12
cmp eax, edi
je 0x50dd12
jle 0x50dd8f
and eax, 0xffff
or eax, 0x80070000
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
push edx
push ecx
mov ecx, dword [esp + 0x24]
push eax
push ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, edi
mov dword [esi + 8], eax
jne 0x50dd3f
call fcn.0040f010
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
mov ecx, dword [esp + 0x10]
push edi
push ecx
mov edx, edi
push edx
mov dword [esi + 4], ecx
mov ecx, edi
push ecx
push ebp
push eax
mov dword [esi + 0x18], ebp
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
cmp eax, edi
mov dword [esi], eax
jne 0x50dd8d
call fcn.0040f010
mov ebx, eax
cmp ebx, edi
jl 0x50dd75
mov ebx, 0x80004005
mov edx, dword [esi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], edi
mov eax, ebx
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 0xc

Function at 0x50dda0
Capabilities:
Get file size

Disassembly:
sub esp, 0xc
push esi
push edi
mov edi, eax
test edi, edi
mov esi, ecx
je 0x50ddcd
lea eax, [esp + 0xc]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, 4
mov ecx, edi
mov dword [esp + 8], eax
call fcn.0050de10
test eax, eax
jge 0x50ddfd
push edi
push 4
push 2
mov eax, ebx
call fcn.0050dcc0
mov edi, eax
test edi, edi
jl 0x50ddfb
mov esi, dword [esi + 8]
push 4
mov eax, esi
call fcn.0050db00
add esp, 4
test eax, eax
jne 0x50ddfb
push esi
call fcn.0050dbd0
add esp, 4
mov eax, edi
pop edi
pop esi
add esp, 0xc
ret
Function at 0x50e580
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0
push 0x80
mov esi, edx
push esi
push 0
push eax
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x50e6fc
call fcn.0040f010
test eax, eax
jl 0x50e6f3
mov ebx, dword [ebp + 8]
cmp edi, 0xffffffff
jne 0x50e672
cmp esi, 4
jne 0x50e706
xor edi, edi
lea esi, [esp + 0x10]
mov ecx, ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
call fcn.004174a0
xor eax, eax
cmp dword [esp + 0x14], eax
ja 0x50e5f7
cmp dword [esp + 0x10], 2
jb 0x50e672
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
lea esi, [esp + 0x18]
call fcn.00487a50
test eax, eax
mov esi, dword [esp + 0x18]
jl 0x50e63b
test esi, esi
je 0x50e63b
movzx eax, word [esi]
cmp eax, 0xfeff
je 0x50e636
cmp eax, 0xfffe
je 0x50e636
mov ebx, dword [esp + 0x1c]
mov ecx, esi
call fcn.0050e420
test eax, eax
je 0x50e63b
mov edi, 1
xor ebx, ebx
test esi, esi
je 0x50e653
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x50e653
call fcn.0040f010
mov ebx, eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x50e66f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x50e66f
test ebx, ebx
jl 0x50e66f
call fcn.0040f010
mov ebx, dword [ebp + 8]
cmp edi, 1
mov dword [ebx + 4], edi
jne 0x50e6cc
mov eax, dword [ebx]
lea edx, [esp + 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x50e69e
call fcn.0040f010
test eax, eax
jl 0x50e6a4
mov eax, dword [esp + 0x10]
or eax, dword [esp + 0x14]
jne 0x50e6cc
mov eax, dword [ebx]
push 0
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x18]
push edx
push eax
mov dword [esp + 0x20], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x50e6cc
call fcn.0040f010
mov edx, dword [ebx]
push 2
xor eax, eax
lea ecx, [esp + 0x18]
push ecx
push eax
push edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x50e6f1
call fcn.0040f010
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ebx, dword [ebp + 8]
mov dword [ebx], eax
jmp 0x50e5c1
mov edi, 1
jmp 0x50e672
Function at 0x50e710
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5f9d08
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [esp + 0x20]
cmp dword [esi + 4], 0
jne 0x50e7b5
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00510810
push 2
push 0x628d84
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x24], 0
call fcn.0044c560
mov eax, dword [esp + 0x20]
mov ecx, dword [eax - 0xc]
push 0
lea edx, [esp + 0x10]
push edx
push ecx
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x50e789
call fcn.0040f010
mov edi, eax
jmp 0x50e78b
xor edi, edi
mov dword [esp + 0x18], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x50e7fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x50e7fd
push 0
lea ecx, [esp + 0x24]
push ecx
lea edx, [ebx + ebx]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edx
push eax
mov eax, dword [esi]
push eax
call ebx
test eax, eax
jne 0x50e7db
call fcn.0040f010
mov edi, eax
test edi, edi
jl 0x50e7fd
mov edx, dword [esi]
push 0
lea ecx, [esp + 0x10]
push ecx
push 4
push 0x625fc4
push edx
call ebx
test eax, eax
jne 0x50e7fb
call fcn.0040f010
mov edi, eax
jmp 0x50e7fd
xor edi, edi
xor eax, eax
test edi, edi
setge al
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
add esp, 0x10
ret 4

Function at 0x50e820
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push ebx
push esi
mov esi, edx
cmp dword [esi + 4], 0
mov ebx, ecx
jne 0x50e88f
push eax
lea eax, [esp + 0xc]
push eax
call fcn.00510810
mov eax, dword [esp + 8]
mov ecx, dword [eax - 0xc]
push 0
lea edx, [esp + 0x10]
push edx
push ecx
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x50e860
call fcn.0040f010
mov esi, eax
jmp 0x50e862
xor esi, esi
mov eax, dword [esp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x50e8be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
test esi, esi
pop esi
setge al
pop ebx
add esp, 8
ret
push 0
lea ecx, [esp + 0x10]
push ecx
lea edx, [ebx + ebx]
push edx
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x50e8bc
call fcn.0040f010
mov esi, eax
xor eax, eax
test esi, esi
pop esi
setge al
pop ebx
add esp, 8
ret
xor esi, esi
xor eax, eax
test esi, esi
pop esi
setge al
pop ebx
add esp, 8
ret
Function at 0x50eb20
Capabilities:
Get file size
Write file on windows

Disassembly:
sub esp, 0x14
cmp dword [esi + 4], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
jne 0x50eb5d
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
jle 0x50eb5d
push 0
push 0x80
push 4
push 0
push 7
push SysReAllocStringLen
push eax
call ebx
cmp eax, 0xffffffff
jne 0x50eb5a
call fcn.0040f010
jmp 0x50eb5d
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x50ebe2
lea ecx, [esp + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x50eb86
call fcn.0040f010
test eax, eax
jl 0x50eb8c
mov eax, dword [esp + 0x10]
or eax, dword [esp + 0x14]
jne 0x50ebe2
mov eax, dword [esi]
xor edi, edi
push edi
push 0x80
push 4
push edi
push 7
push 0x40000000
push eax
call ebx
cmp eax, 0xffffffff
jne 0x50ebe8
call fcn.0040f010
test eax, eax
jl 0x50ebe2
push 0
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x18]
push eax
push edi
mov dword [esp + 0x20], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x50ebd7
call fcn.0040f010
test edi, edi
je 0x50ebe2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
add esp, 0x14
ret
mov edi, eax
jmp 0x50ebb1