Function at 0x46b071
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 0x46b092
mov eax, 0x80030005
jmp 0x46b388
mov eax, dword [ebx + 0x12c]
or eax, dword [ebx + 0x128]
push esi
je 0x46b24e
xor edx, edx
lea eax, [ebx + 0xe8]
lea ecx, [ebx + 0x10]
mov esi, dword [ecx + 4]
or esi, dword [ecx]
je 0x46b0bb
cmp dword [eax], edi
je 0x46b0c9
inc edx
add eax, 4
add ecx, 0x18
cmp edx, 9
jb 0x46b0b0
jmp 0x46b0e9
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.0046a2ca
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x46b10c
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.0046a776
mov dword [ebp - 4], eax
lea esi, [ebx + 0x150]
mov eax, dword [esi]
cmp eax, edi
je 0x46b12f
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 0x46b2fc
mov eax, dword [ebx + 0x14c]
cmp dword [ebx + 0x128], eax
jae 0x46b151
push eax
mov ecx, ebx
call fcn.0046ac83
mov dword [ebp - 4], eax
cmp dword [ebp - 4], edi
jl 0x46b2fc
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 0x46b1a4
call esi
test eax, eax
je 0x46b1a4
call esi
push eax
call fcn.0042f6c9
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jl 0x46b1fb
mov dword [ebp - 4], 0x8004022d
jmp 0x46b1fb
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 0x46b1c8
cmp dword [ebp - 8], edi
je 0x46b1df
call esi
push eax
call fcn.0042f6c9
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jl 0x46b1f9
mov dword [ebp - 4], 0x8003001d
cmp dword [ebp - 4], 0
jl 0x46b1f9
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 0x46b307
call esi
test eax, eax
je 0x46b307
call esi
push eax
call fcn.0042f6c9
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jl 0x46b384
mov dword [ebp - 4], 0x8004022d
jmp 0x46b384
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 0x46b2fc
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 0x46b2af
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x46b2af
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042f6c9
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jl 0x46b2eb
mov dword [ebp - 4], 0x8004022d
jmp 0x46b2eb
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 0x46b2d0
cmp dword [ebp - 8], 0x18
je 0x46b2eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042f6c9
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jl 0x46b2eb
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 0x46b262
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x46b1fb
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 0x46b369
cmp dword [ebp - 8], esi
je 0x46b384
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042f6c9
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jl 0x46b384
mov dword [ebp - 4], 0x8003001d
mov eax, dword [ebp - 4]
pop esi
pop edi
pop ebx
leave
ret