Function at 0x30083309
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push ebx
push edi
xor edi, edi
mov ebx, ecx
cmp dword [ebx + 8], edi
mov dword [ebp - 4], edi
jne 0x3008332a
mov eax, 0x80030005
jmp 0x30083651
mov eax, dword [ebx + 0x12c]
or eax, dword [ebx + 0x128]
push esi
je 0x300834e3
xor edx, edx
lea eax, [ebx + 0xe8]
lea ecx, [ebx + 0x10]
mov esi, dword [ecx + 4]
or esi, dword [ecx]
je 0x30083353
cmp dword [eax], edi
je 0x30083361
inc edx
add eax, 4
add ecx, 0x18
cmp edx, 9
jb 0x30083348
jmp 0x30083381
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.3008278a
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x300833a4
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.30082c9c
mov dword [ebp - 4], eax
lea esi, [ebx + 0x150]
mov eax, dword [esi]
cmp eax, edi
je 0x300833c7
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 0x300835c6
mov eax, dword [ebx + 0x14c]
cmp dword [ebx + 0x128], eax
jae 0x300833e9
push eax
mov ecx, ebx
call fcn.30082f0c
mov dword [ebp - 4], eax
cmp dword [ebp - 4], edi
jl 0x300835c6
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 0x3008343b
call esi
test eax, eax
je 0x3008343b
call esi
push eax
call fcn.300440d4
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x30083491
mov dword [ebp - 4], 0x8004022d
jmp 0x30083491
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 0x3008345f
cmp dword [ebp - 8], edi
je 0x30083475
call esi
push eax
call fcn.300440d4
test eax, eax
mov dword [ebp - 4], eax
jl 0x3008348f
mov dword [ebp - 4], 0x8003001d
cmp dword [ebp - 4], 0
jl 0x3008348f
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 0x300835d1
call esi
test eax, eax
je 0x300835d1
call esi
push eax
call fcn.300440d4
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x3008364d
mov dword [ebp - 4], 0x8004022d
jmp 0x3008364d
mov edi, dword [ebx + 0x140]
mov esi, dword [ebx + 0x144]
lea eax, [ebp - 0x14]
lea ecx, [ebx + 0x10c]
push eax
call fcn.300672be
lea eax, [ebx + 0x10c]
push eax
push dword [eax + 4]
lea ecx, [ebp - 0x1c]
call fcn.30035a7d
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x14]
call fcn.3001cec7
test al, al
jne 0x300835c4
push 0
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebx + 0x11c]
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x30083563
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x30083563
call esi
push eax
call fcn.300440d4
test eax, eax
mov dword [ebp - 4], eax
jl 0x300835a4
mov dword [ebp - 4], 0x8004022d
jmp 0x300835a4
lea ecx, [ebp - 0x14]
call fcn.30035a57
push 0
lea ecx, [ebp - 8]
push ecx
push 0x18
push eax
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x3008358a
cmp dword [ebp - 8], 0x18
je 0x300835a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.300440d4
test eax, eax
mov dword [ebp - 4], eax
jl 0x300835a4
mov dword [ebp - 4], 0x8003001d
lea ecx, [ebp - 0x14]
call fcn.30035a57
mov edi, dword [eax + 0x10]
mov esi, dword [eax + 0x14]
lea ecx, [ebp - 0x14]
call fcn.3004a319
cmp dword [ebp - 4], 0
jge 0x300834fe
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x30083491
mov eax, dword [ebx + 0x118]
push 0x36
pop ecx
mov dword [ebp - 0x11c], eax
mov eax, dword [ebx + 0x140]
push 6
lea esi, [ebx + 0x10]
lea edi, [ebp - 0x114]
rep movsd dword es:[edi], dword [esi]
pop ecx
lea esi, [ebx + 0x128]
lea edi, [ebp - 0x3c]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x144]
push 0
mov dword [ebp - 0x20], eax
lea eax, [ebp - 8]
push eax
mov esi, 0x100
push esi
lea eax, [ebp - 0x11c]
push eax
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x30083633
cmp dword [ebp - 8], esi
je 0x3008364d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.300440d4
test eax, eax
mov dword [ebp - 4], eax
jl 0x3008364d
mov dword [ebp - 4], 0x8003001d
mov eax, dword [ebp - 4]
pop esi
pop edi
pop ebx
leave
ret