Function at 0x4afd50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a457e
mov eax, dword fs:[0]
push eax
sub esp, 0x280
mov eax, dword [0x62cf50]
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 0x4b00a1
mov esi, dword [ebp + 0x14]
cmp esi, 4
ja 0x4b00a1
push 0x200
lea eax, [ebp - 0x210]
push ebx
push eax
lfence
call fcn.0056aed0
push esi
push str._ZoneTransfer__r_nZoneId_u_r_n
lea eax, [ebp - 0x210]
push 0x200
push eax
call fcn.004b0680
add esp, 0x1c
test eax, eax
js 0x4b00a1
push 0x5c503c
push dword [ebp - 0x264]
lea eax, [ebp - 0x25c]
mov dword [edi], ebx
push eax
call fcn.0042e0c0
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 0x4afe7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x26c]
mov dword [ebp - 0x268], eax
cmp edi, 0xffffffff
jne 0x4afe61
xor edi, edi
jmp 0x4afe74
mov esi, edi
mov dword [ebp - 0x264], esi
call fcn.00413e80
mov eax, dword [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x4b005b
cmp edi, 0xffffffff
je 0x4b005b
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.00433a80
add esp, 8
test al, al
je 0x4aff64
lea eax, [ebp - 0x22c]
push eax
push esi
call fcn.00433a80
add esp, 8
test al, al
je 0x4aff64
cmp dword [ebp - 0x234], 0
je 0x4aff64
cmp dword [ebp - 0x21c], 0
je 0x4aff64
push 0x5c503c
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x28c]
push eax
call fcn.0042e0c0
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 0x4aff3b
mov ecx, dword [ecx]
cmp dword [ebp - 0x218], 8
lea eax, [ebp - 0x22c]
push ecx
cmovae eax, dword [ebp - 0x22c]
push eax
call fcn.0040d741
add esp, 8
mov byte [ebp - 0x25d], 0
test eax, eax
je 0x4aff6b
mov byte [ebp - 0x25d], 1
mov dword [ebp - 4], 4
test bl, 1
je 0x4aff82
lea ecx, [ebp - 0x28c]
call fcn.0040a580
cmp byte [ebp - 0x25d], 0
jne 0x4afff6
lea edi, [ebp - 0x210]
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4aff94
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 0x4afff6
cmp dword [ebp - 0x214], edi
jne 0x4afff6
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov edi, esi
xor esi, esi
mov dword [ebp - 0x264], esi
test edi, edi
je 0x4affea
cmp edi, 0xffffffff
je 0x4affea
call fcn.00413e80
mov eax, dword [ebp - 0x274]
mov bl, 1
mov dword [eax], edi
jmp 0x4afff8
xor bl, bl
mov eax, dword [ebp - 0x218]
mov byte [ebp - 4], 0xc
cmp eax, 8
jb 0x4b001a
inc eax
lea ecx, [ebp - 0x22c]
push eax
push dword [ebp - 0x22c]
call fcn.0040a5e0
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 0x4b005d
inc eax
lea ecx, [ebp - 0x244]
push eax
push dword [ebp - 0x244]
call fcn.0040a5e0
jmp 0x4b005d
xor bl, bl
mov byte [ebp - 4], 0xe
test esi, esi
je 0x4b0078
cmp esi, 0xffffffff
je 0x4b0078
call fcn.00413e80
push esi
call fcn.00415030
add esp, 4
mov ecx, dword [ebp - 0x248]
mov dword [ebp - 4], 0xf
cmp ecx, 8
jb 0x4b009d
inc ecx
push ecx
push dword [ebp - 0x25c]
lea ecx, [ebp - 0x25c]
call fcn.0040a5e0
mov al, bl
jmp 0x4b00a3
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 int.004016cd
mov esp, ebp
pop ebp
ret