Function at 0x402ba0
Capabilities:
Acquire debug privileges
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
mov eax, dword [0x422004]
xor eax, esp
mov dword [esp + 0x220], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [0x447808]
push esi
push edi
push 0x41b5bc
mov dword [esp + 0x14], eax
lea eax, [esp + 0x10]
push edx
push eax
mov dword [esp + 0x18], 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
mov eax, dword [esp + 0x18]
add esp, 0xc
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetws]
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test eax, eax
je 0x402c3b
push eax
lea eax, [esp + 0x2c]
push pe_nt_image_headers32
push eax
call esi
add esp, 0xc
test eax, eax
je 0x402c32
nop
lea edx, [esp + 0x28]
mov ecx, ebx
call fcn.00401800
push dword [esp + 0xc]
lea eax, [esp + 0x2c]
push pe_nt_image_headers32
push eax
call esi
add esp, 0xc
test eax, eax
jne 0x402c10
push dword [esp + 0xc]
call edi
add esp, 4
mov eax, dword [0x44780c]
test al, 1
je 0x402cc0
push 0x422a20
push 0x41b5c0
call fcn.004014f0
mov eax, dword [0x44780c]
add esp, 8
test al, 1
je 0x402cc0
push 0x422020
push 0x41b5d4
call fcn.004014f0
mov eax, dword [0x44780c]
add esp, 8
test al, 1
je 0x402cc0
push 0x422820
push 0x41b5ec
call fcn.004014f0
mov eax, dword [0x44780c]
add esp, 8
test al, 1
je 0x402cc0
push eax
push 0x41b604
call fcn.004014f0
mov eax, dword [0x44780c]
add esp, 8
test al, 1
je 0x402cc0
push 0
push 0x730
push 0x41b61c
call fcn.004014f0
add esp, 0xc
push 0x41b5bc
push dword [esp + 0x14]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
mov eax, dword [esp + 0x18]
add esp, 0xc
test eax, eax
je 0x402d2b
push eax
lea eax, [esp + 0x2c]
push pe_nt_image_headers32
push eax
call esi
add esp, 0xc
test eax, eax
je 0x402d22
nop dword [eax + eax]
lea edx, [esp + 0x28]
mov ecx, ebx
call fcn.00402880
push dword [esp + 0xc]
lea eax, [esp + 0x2c]
push pe_nt_image_headers32
push eax
call esi
add esp, 0xc
test eax, eax
jne 0x402d00
push dword [esp + 0xc]
call edi
add esp, 4
mov eax, dword [0x44780c]
test al, al
jns 0x402de5
test al, 1
je 0x402d49
push 0x41b86c
call fcn.00401530
add esp, 4
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
push 0xf01ff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402dc3
lea eax, [esp + 0x10]
push eax
push 0x41b884
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x402db9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0x10
mov dword [esp + 0x28], eax
lea eax, [esp + 0x24]
push eax
push 0
push dword [esp + 0x20]
mov dword [esp + 0x30], 1
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x44780c]
test al, 1
je 0x402de5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x41b8a8
call fcn.00401530
mov eax, dword [0x44780c]
add esp, 8
test al, 2
je 0x402f55
test al, 1
je 0x402e03
push 0x422020
push str.32_dump_to__s_n
call fcn.004014f0
add esp, 8
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 0x422020
push 0
push 1
call edi
mov esi, eax
push esi
call fcn.00419478
add esp, 4
mov dword [esp + 0x10], eax
push 0
push 0
push esi
mov esi, eax
push esi
push 0xffffffffffffffff
push 0x422020
push 0
push 1
call edi
test eax, eax
jne 0x402e51
push esi
call fcn.00419473
add esp, 4
xor esi, esi
push 0xc
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov edi, eax
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push esi
mov dword [edi + 8], 2
mov dword [edi + 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi], eax
test esi, esi
je 0x402e94
push esi
call fcn.00419473
add esp, 4
xor edx, edx
mov dword [esp + 0xc], edx
cmp dword [ebx + 0xe621c08], edx
jle 0x402f2a
lea esi, [ebx + 0x22308]
nop dword [eax]
push dword [esi + 0x24]
cmp byte [esi - 0x280], 0
lea eax, [esi - 0x1c0]
push dword [esi + 0x20]
lea ecx, [esi - 0x280]
push dword [esi + 4]
push dword [esi]
push dword [esi - 4]
push dword [esi - 8]
push dword [esi - 0xc]
push dword [esi - 0x10]
push dword [esi + 0xc]
push dword [esi + 8]
push eax
push ecx
mov ecx, 0x41b7df
mov eax, 0x41b7dc
cmove eax, ecx
push eax
lea eax, [esi - 0x580]
push eax
lea eax, [esi - 0x700]
push eax
push dword [esi + 0x1c]
push dword [esi + 0x18]
push edx
push 0x41b7e0
push edi
call fcn.00407010
mov edx, dword [esp + 0x5c]
lea esi, [esi + 0x730]
inc edx
add esp, 0x50
mov dword [esp + 0xc], edx
cmp edx, dword [ebx + 0xe621c08]
jl 0x402eb0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [edi + 4]
test esi, esi
je 0x402f4b
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebx + 0xe621c08]
test eax, eax
je 0x403044
xor ecx, ecx
mov edx, 0x730
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00419478
imul ecx, dword [ebx + 0xe621c08], 0x730
add esp, 4
mov esi, eax
mov dword [esp + 0x10], esi
push ecx
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0xc], 0
cmp dword [ebx + 0xe621c08], 0
jle 0x402fdc
mov eax, esi
lea edx, [ebx + 0x21c08]
mov esi, edx
mov edi, eax
mov ecx, 0x1cc
add edx, 0x730
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0xc]
add eax, 0x730
inc ecx
mov dword [esp + 0xc], ecx
cmp ecx, dword [ebx + 0xe621c08]
jl 0x402fb1
mov esi, dword [esp + 0x10]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push 0x422420
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40303b
imul ecx, dword [ebx + 0xe621c08], 0x730
lea eax, [esp + 0x10]
push 0
push eax
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test byte [0x44780c], 1
je 0x403034
push dword [esp + 0x10]
push str.save:__d_bytes_n
call fcn.004014f0
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00419473
add esp, 4
mov ecx, dword [esp + 0x22c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00419265
mov esp, ebp
pop ebp
ret