Function at 0x3008362b
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 0x3008364c
mov eax, 0x80030005
jmp 0x30083973
mov eax, dword [ebx + 0x12c]
or eax, dword [ebx + 0x128]
push esi
je 0x30083805
xor edx, edx
lea eax, [ebx + 0xe8]
lea ecx, [ebx + 0x10]
mov esi, dword [ecx + 4]
or esi, dword [ecx]
je 0x30083675
cmp dword [eax], edi
je 0x30083683
inc edx
add eax, 4
add ecx, 0x18
cmp edx, 9
jb 0x3008366a
jmp 0x300836a3
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.30082a7c
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x300836c6
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.30082fbe
mov dword [ebp - 4], eax
lea esi, [ebx + 0x150]
mov eax, dword [esi]
cmp eax, edi
je 0x300836e9
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 0x300838e8
mov eax, dword [ebx + 0x14c]
cmp dword [ebx + 0x128], eax
jae 0x3008370b
push eax
mov ecx, ebx
call fcn.3008322e
mov dword [ebp - 4], eax
cmp dword [ebp - 4], edi
jl 0x300838e8
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 0x3008375d
call esi
test eax, eax
je 0x3008375d
call esi
push eax
call fcn.30043dd4
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x300837b3
mov dword [ebp - 4], 0x8004022d
jmp 0x300837b3
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 0x30083781
cmp dword [ebp - 8], edi
je 0x30083797
call esi
push eax
call fcn.30043dd4
test eax, eax
mov dword [ebp - 4], eax
jl 0x300837b1
mov dword [ebp - 4], 0x8003001d
cmp dword [ebp - 4], 0
jl 0x300837b1
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 0x300838f3
call esi
test eax, eax
je 0x300838f3
call esi
push eax
call fcn.30043dd4
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x3008396f
mov dword [ebp - 4], 0x8004022d
jmp 0x3008396f
mov edi, dword [ebx + 0x140]
mov esi, dword [ebx + 0x144]
lea eax, [ebp - 0x14]
lea ecx, [ebx + 0x10c]
push eax
call fcn.30082546
lea eax, [ebx + 0x10c]
push eax
push dword [eax + 4]
lea ecx, [ebp - 0x1c]
call fcn.30082414
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x14]
call fcn.3003183d
test al, al
jne 0x300838e6
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 0x30083885
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x30083885
call esi
push eax
call fcn.30043dd4
test eax, eax
mov dword [ebp - 4], eax
jl 0x300838c6
mov dword [ebp - 4], 0x8004022d
jmp 0x300838c6
lea ecx, [ebp - 0x14]
call fcn.300823ee
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 0x300838ac
cmp dword [ebp - 8], 0x18
je 0x300838c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.30043dd4
test eax, eax
mov dword [ebp - 4], eax
jl 0x300838c6
mov dword [ebp - 4], 0x8003001d
lea ecx, [ebp - 0x14]
call fcn.300823ee
mov edi, dword [eax + 0x10]
mov esi, dword [eax + 0x14]
lea ecx, [ebp - 0x14]
call fcn.30080427
cmp dword [ebp - 4], 0
jge 0x30083820
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x300837b3
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 0x30083955
cmp dword [ebp - 8], esi
je 0x3008396f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.30043dd4
test eax, eax
mov dword [ebp - 4], eax
jl 0x3008396f
mov dword [ebp - 4], 0x8003001d
mov eax, dword [ebp - 4]
pop esi
pop edi
pop ebx
leave
ret