Function at 0x4a4090
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57643e
mov eax, dword fs:[0]
push eax
sub esp, 0x330
mov eax, dword [0x5edd38]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x264], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x270], eax
mov dword [ebp - 0x274], edi
mov dword [ebp - 0x268], ebx
test edi, edi
je 0x4a4405
mov esi, dword [ebp + 0x14]
cmp esi, 4
ja 0x4a4405
push 0x200
lea eax, [ebp - 0x210]
push ebx
push eax
lfence
call fcn.0053f340
push esi
push str._ZoneTransfer__r_nZoneId_u_r_n
lea eax, [ebp - 0x210]
push 0x200
push eax
call fcn.004a49f0
add esp, 0x1c
test eax, eax
js 0x4a4405
push 0x5928d4
push dword [ebp - 0x264]
lea eax, [ebp - 0x25c]
mov dword [edi], ebx
push eax
call fcn.00429af0
add esp, 0xc
cmp dword [ebp - 0x248], 8
lea eax, [ebp - 0x25c]
push ebx
cmovae eax, dword [ebp - 0x25c]
push ebx
push 2
push ebx
push 1
push 0x40000000
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor esi, esi
mov dword [ebp - 0x26c], eax
xor edi, edi
mov dword [ebp - 0x264], esi
test eax, eax
je 0x4a41bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x26c]
mov dword [ebp - 0x268], eax
cmp edi, 0xffffffff
jne 0x4a41a1
xor edi, edi
jmp 0x4a41b4
mov esi, edi
mov dword [ebp - 0x264], esi
call fcn.00412510
mov eax, dword [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x4a439f
cmp edi, 0xffffffff
je 0x4a439f
xor eax, eax
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 7
mov word [ebp - 0x244], ax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x218], 7
mov word [ebp - 0x22c], ax
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 4
push eax
push dword [ebp - 0x270]
call fcn.004304a0
add esp, 8
test al, al
je 0x4a42a4
lea eax, [ebp - 0x22c]
push eax
push esi
call fcn.004304a0
add esp, 8
test al, al
je 0x4a42a4
cmp dword [ebp - 0x234], 0
je 0x4a42a4
cmp dword [ebp - 0x21c], 0
je 0x4a42a4
push 0x5928d4
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x28c]
push eax
call fcn.00429af0
add esp, 0xc
mov ecx, eax
cmp dword [ecx + 0x14], 8
mov ebx, 1
mov byte [ebp - 4], 5
mov dword [ebp - 0x268], ebx
jb 0x4a427b
mov ecx, dword [ecx]
cmp dword [ebp - 0x218], 8
lea eax, [ebp - 0x22c]
push ecx
cmovae eax, dword [ebp - 0x22c]
push eax
call fcn.0040c291
add esp, 8
mov byte [ebp - 0x25d], 0
test eax, eax
je 0x4a42ab
mov byte [ebp - 0x25d], 1
mov dword [ebp - 4], 4
test bl, 1
je 0x4a42c5
lea ecx, [ebp - 0x28c]
and ebx, 0xfffffffe
call fcn.0040a280
cmp byte [ebp - 0x25d], 0
jne 0x4a4335
lea edi, [ebp - 0x210]
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4a42d7
push 0
lea eax, [ebp - 0x214]
mov dword [ebp - 0x214], 0
push eax
sub edi, ecx
lea eax, [ebp - 0x210]
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4a4335
cmp dword [ebp - 0x214], edi
jne 0x4a4335
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov edi, esi
xor esi, esi
mov dword [ebp - 0x264], esi
call fcn.00412510
mov eax, dword [ebp - 0x274]
mov byte [ebp - 0x25d], 1
mov dword [eax], edi
jmp 0x4a433c
mov byte [ebp - 0x25d], 0
mov eax, dword [ebp - 0x218]
mov byte [ebp - 4], 0xc
cmp eax, 8
jb 0x4a435e
inc eax
lea ecx, [ebp - 0x22c]
push eax
push dword [ebp - 0x22c]
call fcn.0040a2e0
xor eax, eax
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x218], 7
mov word [ebp - 0x22c], ax
mov eax, dword [ebp - 0x230]
mov byte [ebp - 4], 0xd
cmp eax, 8
jb 0x4a43a6
inc eax
lea ecx, [ebp - 0x244]
push eax
push dword [ebp - 0x244]
call fcn.0040a2e0
jmp 0x4a43a6
mov byte [ebp - 0x25d], 0
mov byte [ebp - 4], 0xe
test esi, esi
je 0x4a43d8
cmp esi, 0xffffffff
je 0x4a43d8
call fcn.00412510
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4a43d8
call fcn.004014a0
test bl, 0x20
je 0x4a43d8
lea ecx, [ebp - 0x33c]
call fcn.004965b0
mov ecx, dword [ebp - 0x248]
mov dword [ebp - 4], 0xf
cmp ecx, 8
jb 0x4a43fd
inc ecx
push ecx
push dword [ebp - 0x25c]
lea ecx, [ebp - 0x25c]
call fcn.0040a2e0
mov al, byte [ebp - 0x25d]
jmp 0x4a4407
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00401682
mov esp, ebp
pop ebp
ret