Function at 0x49b280
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x344
mov eax, dword [0x4cd724]
xor eax, esp
mov dword [esp + 0x340], eax
push ebx
push ebp
mov ebp, dword [esp + 0x350]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x2c], edi
mov byte [0x4ed5e8], 1
call fcn.0049b220
call fcn.004974f0
mov esi, dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
xor ebx, ebx
lea ecx, [esp + 0x1c]
mov eax, 0x100
push ecx
mov byte [esp + 0x1f], bl
mov byte [esp + 0x17], bl
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1e6], bl
mov byte [esp + 0x20e], bl
mov dword [esp + 0x1da], ebx
mov word [esp + 0x1d8], ax
call esi
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1da], edx
lea edx, [esp + 0x1c]
mov ecx, 0x100
push edx
mov dword [esp + 0x1e2], eax
mov dword [esp + 0x24e], ebx
mov byte [esp + 0x6a], bl
mov byte [esp + 0x92], bl
mov dword [esp + 0x5e], ebx
mov word [esp + 0x5c], cx
call esi
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x5e], eax
lea edx, [esp + 0x13]
push edx
lea eax, [esp + 0x1f]
push eax
push ebx
mov dword [esp + 0x6e], ecx
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x68]
push edx
push ebx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x1f0]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x40]
push eax
push edi
lea edx, [esp + 0x54]
lea ecx, [esp + 0x50]
mov dword [esp + 0xfa], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x40], ebx
call fcn.00499970
add esp, 0x2c
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov cl, byte [esp + 0x3c]
dec cl
mov byte [esp + 0x13], bl
cmp cl, 5
jbe 0x49b3d0
mov dl, byte [esp + 0x50]
dec dl
cmp dl, 5
jbe 0x49b3d0
mov esi, 2
mov dword [0x4ed5ec], esi
mov byte [0x4ed5f8], 1
mov byte [0x4ed5f9], 1
jmp 0x49b512
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x5c]
push ecx
push edx
lea esi, [esp + 0x3c]
lea edi, [esp + 0x1e0]
call fcn.0049a1d0
add esp, 0xc
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
je 0x49b422
cmp esi, 0xb7
jne 0x49b4fa
cmp ebp, 0xffffffff
je 0x49b4fa
lea eax, [esp + 0x13]
push eax
push ebp
mov ecx, 0x4ed2d0
call fcn.0049a510
mov esi, eax
cmp esi, ebx
jne 0x49b4f4
cmp byte [esp + 0x13], bl
jne 0x49b4f4
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
push ebx
lea ecx, [esp + 0x18]
push ecx
dec edi
push edi
push edx
push ebp
mov byte [0x4ed5f8], 1
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x49b4e5
cmp edi, dword [esp + 0x14]
jne 0x49b4de
mov al, byte [esp + 0x3c]
dec al
cmp al, 5
ja 0x49b4c8
mov cl, byte [esp + 0x50]
dec cl
cmp cl, 5
ja 0x49b4c8
mov eax, dword [esp + 0x28]
push ebx
lea edx, [esp + 0x18]
push edx
push edi
push eax
push ebp
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x49b4e5
cmp edi, dword [esp + 0x14]
jne 0x49b4de
mov ecx, dword [esp + 0x2c]
push ecx
mov byte [0x4ed5f9], 1
call fcn.0049d410
add esp, 4
jmp 0x49b50b
mov edx, dword [esp + 0x2c]
push edx
mov byte [0x4ed5f9], 1
call fcn.0049d410
add esp, 4
jmp 0x49b50b
mov byte [esp + 0x13], 0x1a
jmp 0x49b50b
mov byte [esp + 0x13], 0x19
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x49b50b
mov al, byte [esp + 0x13]
jmp 0x49b500
mov al, 6
mov byte [esp + 0x13], al
mov dword [0x4ed5ec], esi
mov byte [0x4ed5e9], al
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
mov cl, byte [esp + 0x13]
mov byte [0x4ed5f0], bl
mov byte [0x4ed5f1], cl
mov dword [0x4ed5f4], esi
cmp eax, ebx
je 0x49b539
push eax
call fcn.004684a1
add esp, 4
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x49b54a
push eax
call fcn.004684a1
add esp, 4
mov ecx, dword [esp + 0x350]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004677af
add esp, 0x344
ret