Function at 0x46c659
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push edi
xor edi, edi
mov ebx, ecx
cmp dword [ebx + 8], edi
mov dword [ebp - 4], edi
jne 0x46c67a
mov eax, 0x80030005
jmp 0x46c970
mov eax, dword [ebx + 0x12c]
or eax, dword [ebx + 0x128]
push esi
je 0x46c836
xor edx, edx
lea eax, [ebx + 0xe8]
lea ecx, [ebx + 0x10]
mov esi, dword [ecx + 4]
or esi, dword [ecx]
je 0x46c6a3
cmp dword [eax], edi
je 0x46c6b1
inc edx
add eax, 4
add ecx, 0x18
cmp edx, 9
jb 0x46c698
jmp 0x46c6d1
lea eax, [ebx + 0x148]
mov ecx, dword [eax]
mov dword [ebx + 0x150], ecx
lea ecx, [ebx + 0x14c]
mov edx, dword [ecx]
mov dword [ebx + 0x154], edx
mov dword [eax], edi
mov dword [ecx], edi
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
mov dword [ebp - 0x10], edi
call fcn.0046b89e
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x46c6f4
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.0046bd50
mov dword [ebp - 4], eax
lea esi, [ebx + 0x150]
mov eax, dword [esi]
cmp eax, edi
je 0x46c717
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi], edi
mov dword [ebx + 0x154], edi
cmp dword [ebp - 4], edi
jl 0x46c8e4
mov eax, dword [ebx + 0x14c]
cmp dword [ebx + 0x128], eax
jae 0x46c739
push eax
mov ecx, ebx
call fcn.0046c26b
mov dword [ebp - 4], eax
cmp dword [ebp - 4], edi
jl 0x46c8e4
mov eax, dword [ebx + 0x13c]
push edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebx + 0x138]
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x46c78c
call esi
test eax, eax
je 0x46c78c
call esi
push eax
call fcn.00430d77
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jl 0x46c7e3
mov dword [ebp - 4], 0x8004022d
jmp 0x46c7e3
push edi
mov edi, dword [ebp - 0x10]
lea eax, [ebp - 8]
push eax
push edi
push dword [ebx + 0x148]
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46c7b0
cmp dword [ebp - 8], edi
je 0x46c7c7
call esi
push eax
call fcn.00430d77
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jl 0x46c7e1
mov dword [ebp - 4], 0x8003001d
cmp dword [ebp - 4], 0
jl 0x46c7e1
xor eax, eax
test edi, edi
setge al
mov dword [ebx + 0x130], edi
dec eax
mov dword [ebx + 0x134], eax
xor edi, edi
mov eax, dword [ebx + 0x124]
push edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebx + 0x120]
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x46c8ef
call esi
test eax, eax
je 0x46c8ef
call esi
push eax
call fcn.00430d77
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jl 0x46c96c
mov dword [ebp - 4], 0x8004022d
jmp 0x46c96c
mov edx, dword [ebx + 0x110]
mov ecx, dword [ebx + 0x140]
mov eax, dword [ebx + 0x144]
mov esi, dword [edx]
cmp esi, dword [ebx + 0x110]
je 0x46c8e4
push edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push ecx
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x46c897
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x46c897
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00430d77
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jl 0x46c8d3
mov dword [ebp - 4], 0x8004022d
jmp 0x46c8d3
push edi
lea eax, [ebp - 8]
push eax
push 0x18
lea eax, [esi + 8]
push eax
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46c8b8
cmp dword [ebp - 8], 0x18
je 0x46c8d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00430d77
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jl 0x46c8d3
mov dword [ebp - 4], 0x8003001d
cmp dword [ebp - 4], edi
mov ecx, dword [esi + 0x18]
mov eax, dword [esi + 0x1c]
mov esi, dword [esi]
jge 0x46c84a
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x46c7e3
mov eax, dword [ebx + 0x118]
push 0x36
pop ecx
mov dword [ebp - 0x110], eax
mov eax, dword [ebx + 0x140]
push 6
lea esi, [ebx + 0x10]
lea edi, [ebp - 0x108]
rep movsd dword es:[edi], dword [esi]
pop ecx
lea esi, [ebx + 0x128]
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x144]
push 0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 8]
push eax
mov esi, 0x100
push esi
lea eax, [ebp - 0x110]
push eax
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46c951
cmp dword [ebp - 8], esi
je 0x46c96c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00430d77
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jl 0x46c96c
mov dword [ebp - 4], 0x8003001d
mov eax, dword [ebp - 4]
pop esi
pop edi
pop ebx
leave
ret