Function at 0x4a9700
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5dc96d
push eax
mov dword fs:[0], esp
sub esp, 0x474
push ebx
mov ebx, dword [esp + 0x488]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
je 0x4a9970
push ebx
call fcn.004538bc
add esp, 4
test eax, eax
je 0x4a9970
mov esi, dword [esp + 0x4a0]
cmp esi, ebp
je 0x4a9970
push esi
call fcn.004538bc
add esp, 4
test eax, eax
je 0x4a9970
mov eax, dword [0x63d178]
mov dword [esp + 0x14], eax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x76]
mov word [esp + 0x74], bp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x27e]
mov word [esp + 0x27c], bp
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x27c]
lea edx, [esp + 0x74]
push ecx
push edx
push ebp
push ebp
push esi
mov dword [esp + 0x4a0], ebp
stosw word es:[edi], ax
call fcn.0056a89f
add esp, 0x14
lea eax, [esp + 0x74]
lea ecx, [esp + 0x1c]
push eax
call fcn.005b7d77
lea ecx, [esp + 0x27c]
mov byte [esp + 0x48c], 1
push ecx
lea ecx, [esp + 0x14]
call fcn.005b7d77
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
push edx
push eax
lea ecx, [esp + 0x1c]
push 0x642ec0
push ecx
mov byte [esp + 0x49c], 2
call fcn.005b496b
add esp, 0x10
lea ecx, [esp + 0x14]
call fcn.005b829d
call fcn.0054fc30
test eax, eax
je 0x4a9857
call fcn.0054fde0
cmp eax, 0x50000
jb 0x4a9857
lea edx, [esp + 0x14]
lea eax, [esp + 0x18]
push edx
push 0x6304d4
push eax
call fcn.005b801c
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x490], 3
call fcn.005b7e4a
lea ecx, [esp + 0x18]
mov byte [esp + 0x48c], 2
call fcn.005b7d03
lea ecx, [esp + 0x10]
mov byte [esp + 0x48c], 1
call fcn.005b7d03
lea ecx, [esp + 0x1c]
mov byte [esp + 0x48c], 0
call fcn.005b7d03
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x51], edx
lea eax, [esp + 0x50]
mov dword [esp + 0x55], edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x59], edx
push 1
mov dword [esp + 0x61], edx
push eax
mov word [esp + 0x69], dx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x44], ecx
mov byte [esp + 0x58], cl
mov byte [esp + 0x6b], dl
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push ebp
push ebp
lea ecx, [esp + 0x58]
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x34]
push eax
lea edx, [esp + 0x54]
push ecx
push ebp
lea ecx, [esp + 0x50]
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x48], 1
mov dword [esp + 0x44], edx
call fcn.0044b221
lea edx, [esp + 0x44]
push 1
push edx
lea ecx, [esp + 0x70]
mov byte [esp + 0x494], 4
call fcn.0044b31e
push ebp
push esi
mov byte [esp + 0x494], 5
call fcn.004abe10
mov ebp, eax
add esp, 8
cmp ebp, 0xffffffff
mov dword [esp + 0x2c], ebp
jne 0x4a998b
push esi
lea ecx, [esp + 0x1c]
call fcn.005b7d77
lea ecx, [esp + 0x18]
mov byte [esp + 0x48c], 5
call fcn.005b7d03
lea ecx, [esp + 0x68]
mov byte [esp + 0x48c], 4
call fcn.0044b35a
lea ecx, [esp + 0x44]
mov byte [esp + 0x48c], 0
call fcn.0044b28c
lea ecx, [esp + 0x14]
mov dword [esp + 0x48c], ebp
call fcn.005b7d03
xor eax, eax
mov ecx, dword [esp + 0x484]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x480
ret
push ebx
mov esi, ebx
call fcn.004538bc
mov ecx, 0x20
add esp, 4
cmp word [ebx], cx
lea eax, [ebx + eax*2]
jne 0x4a99af
cmp esi, eax
jae 0x4a99af
add esi, 2
cmp word [esi], cx
je 0x4a99a3
cmp word [eax - 2], cx
jne 0x4a99c2
cmp esi, eax
jae 0x4a99c2
add eax, 0xfffffffe
cmp word [eax - 2], cx
je 0x4a99b5
sub eax, esi
sar eax, 1
mov edi, eax
lea eax, [edi + edi + 2]
push eax
call fcn.005b83cc
mov ebx, eax
lea ecx, [edi + edi]
xor eax, eax
add esp, 4
cmp edi, eax
mov dword [esp + 0x28], ebx
mov word [ecx + ebx], ax
jle 0x4a99f8
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x498]
mov dword [esp + 0x24], eax
cmp esi, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], eax
je 0x4a9dfb
push esi
call fcn.004538bc
add esp, 4
test eax, eax
je 0x4a9df9
push esi
call fcn.004538bc
mov ecx, 0x20
add esp, 4
cmp word [esi], cx
lea eax, [esi + eax*2]
jne 0x4a9a46
cmp esi, eax
jae 0x4a9a46
add esi, 2
cmp word [esi], cx
je 0x4a9a3a
cmp word [eax - 2], cx
jne 0x4a9a59
cmp esi, eax
jae 0x4a9a59
add eax, 0xfffffffe
cmp word [eax - 2], cx
je 0x4a9a4c
sub eax, esi
sar eax, 1
mov edi, eax
lea eax, [edi + edi + 2]
push eax
call fcn.005b83cc
mov ebx, eax
lea ecx, [edi + edi]
add esp, 4
mov dword [esp + 0x64], ebx
test edi, edi
mov word [ecx + ebx], 0
jle 0x4a9a8f
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebp, dword [esp + 0x49c]
test ebp, ebp
je 0x4a9d9a
push ebp
call fcn.004538bc
add esp, 4
test eax, eax
je 0x4a9d9a
push ebp
mov esi, ebp
call fcn.004538bc
mov ecx, 0x20
add esp, 4
cmp word [ebp], cx
lea eax, [ebp + eax*2]
jne 0x4a9ad5
cmp esi, eax
jae 0x4a9ad5
add esi, 2
cmp word [esi], cx
je 0x4a9ac9
cmp word [eax - 2], cx
jne 0x4a9ae8
cmp esi, eax
jae 0x4a9ae8
add eax, 0xfffffffe
cmp word [eax - 2], cx
je 0x4a9adb
sub eax, esi
sar eax, 1
mov ebx, eax
lea eax, [ebx + ebx + 2]
push eax
call fcn.005b83cc
lea ecx, [ebx + ebx]
add esp, 4
test ebx, ebx
mov dword [esp + 0x40], eax
mov word [ecx + eax], 0
jle 0x4a9b1c
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x498]
push eax
call fcn.004538bc
push ebp
mov esi, eax
call fcn.004538bc
mov edi, eax
lea ebx, [edi + esi]
lea ecx, [ebx + ebx + 8]
push ecx
call fcn.005b83cc
mov ebp, eax
push 0x63474c
push ebp
mov word [ebp + ebx*2 + 6], 0
call fcn.00453897
mov edx, dword [esp + 0x4ac]
lea eax, [ebp + 4]
push edx
push eax
call fcn.00453897
add esi, 2
push 0x642ebc
lea ecx, [ebp + esi*2]
push ecx
call fcn.00453897
mov edx, dword [esp + 0x4c0]
inc esi
push edx
lea eax, [ebp + esi*2]
push eax
call fcn.00453897
push 0x10
add esi, edi
call fcn.005b83cc
mov ecx, dword [esp + 0x4c8]
mov ebx, dword [esp + 0x5c]
mov edi, eax
lea edx, [esp + 0x60]
push edx
mov edx, dword [esp + 0x5c]
mov dword [edi + 4], ecx
push edi
lea eax, [esp + 0x58]
push 0x4aa0a0
lea ecx, [esp + 0x60]
push eax
push ecx
push edx
push ebx
mov dword [esp + 0x98], edi
mov dword [edi], ebx
mov dword [edi + 8], ebp
mov dword [edi + 0xc], esi
call fcn.004ab3f0
add esp, 0x4c
cmp eax, 1
jne 0x4a9c02
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x4a9bfb
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
lea eax, [esi + esi]
add ecx, edx
push eax
push ebp
push ecx
push ebx
call fcn.004abaf0
add esp, 0x10
mov esi, eax
jmp 0x4a9d67
test eax, eax
jne 0x4a9d65
mov eax, dword [esp + 0x28]
push eax
call fcn.004538bc
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 4
mov dword [esp + 0x1c], eax
push 1
push 0
push 0
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x18], 0xffffffff
je 0x4a9c3b
mov dword [esp + 0x18], eax
push 2
push 0
push 0
push ebx
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x10], 0xffffffff
je 0x4a9c55
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x18]
push 0
push 0
push ecx
push ebx
call edi
cmp dword [esp + 0x10], 2
jle 0x4a9c97
mov edx, dword [esp + 0x1c]
lea edi, [edx + esi + 4]
lea eax, [edi + edi + 2]
push eax
call fcn.005b83cc
mov ebx, eax
push 0x642eb4
push ebx
mov word [ebx + edi*2], 0
call fcn.00453897
add esp, 0xc
mov edi, 3
jmp 0x4a9cc4
mov ecx, dword [esp + 0x1c]
lea edi, [ecx + esi + 2]
lea edx, [edi + edi + 2]
push edx
call fcn.005b83cc
mov ebx, eax
push 0x642eb0
push ebx
mov word [ebx + edi*2], 0
call fcn.00453897
add esp, 0xc
mov edi, 1
mov eax, dword [esp + 0x28]
lea ecx, [ebx + edi*2]
push eax
push ecx
call fcn.00453897
mov edx, dword [esp + 0x24]
push 0x642eac
add edi, edx
lea edx, [ebx + edi*2]
push edx
call fcn.00453897
inc edi
push ebp
lea eax, [ebx + edi*2]
push eax
call fcn.00453897
mov ecx, dword [esp + 0x28]
add esp, 0x18
add edi, esi
mov esi, dword [esp + 0x2c]
push 0
push 0
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add edi, edi
test edi, edi
jne 0x4a9d24
push ebx
mov esi, 1
call fcn.005b83f5
mov edi, dword [esp + 0x50]
add esp, 4
jmp 0x4a9d67
lea edx, [esp + 0x10]
push 0
push edx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4a9d49
push ebx
xor esi, esi
call fcn.005b83f5
mov edi, dword [esp + 0x50]
add esp, 4
jmp 0x4a9d67
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, edi
push ebx
sete al
mov esi, eax
call fcn.005b83f5
mov edi, dword [esp + 0x50]
add esp, 4
jmp 0x4a9d67
xor esi, esi
mov ecx, dword [esp + 0x40]
push ecx
call fcn.005b83f5
push ebp
call fcn.005b83f5
push edi
call fcn.005b83f5
mov ebx, dword [esp + 0x70]
add esp, 0xc
push ebx
call fcn.005b83f5
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x30]
add esp, 4
jmp 0x4a9e58
push 8
call fcn.005b83cc
mov edx, dword [esp + 0x49c]
mov edi, eax
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x34]
mov dword [edi + 4], edx
push ecx
push edi
lea edx, [esp + 0x2c]
push 0x4a9eb0
push edx
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x38]
push ecx
push edx
push eax
mov dword [edi], eax
call fcn.004ab3f0
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
push edi
mov esi, ecx
call fcn.005b83f5
add esp, 0x24
push ebx
call fcn.005b83f5
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x30]
add esp, 4
jmp 0x4a9e58
xor eax, eax
lea edx, [esp + 0x30]
lea ecx, [esp + 0x24]
push edx
push eax
push eax
lea eax, [esp + 0x2c]
push eax
push ecx
push ebx
push ebp
call fcn.004ab3f0
add esp, 0x1c
cmp eax, 1
jne 0x4a9e4f
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
cmp eax, 4
jge 0x4a9e3b
lea ecx, [edx + eax + 4]
push ecx
push eax
push ebp
call fcn.004abcd0
add esp, 0xc
mov esi, eax
jmp 0x4a9e58
add edx, eax
add eax, 0xfffffffc
push edx
push eax
push ebp
call fcn.004abcd0
add esp, 0xc
mov esi, eax
jmp 0x4a9e58
xor ecx, ecx
test eax, eax
sete cl
mov esi, ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.005b83f5
add esp, 4
lea ecx, [esp + 0x68]
mov byte [esp + 0x48c], 4
call fcn.0044b35a
lea ecx, [esp + 0x44]
mov byte [esp + 0x48c], 0
call fcn.0044b28c
lea ecx, [esp + 0x14]
mov dword [esp + 0x48c], 0xffffffff
call fcn.005b7d03
mov eax, esi
jmp 0x4a9972