Function at 0x10077720
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x34
push ebx
mov ebx, dword [esp + 0x40]
test ebx, ebx
jne 0x10077733
xor eax, eax
pop ebx
add esp, 0x34
ret
push ebx
call fcn.1007ae50
add esp, 4
test eax, eax
jne 0x10077745
pop ebx
add esp, 0x34
ret
mov eax, dword [ebx]
mov ecx, 1
push ebp
push esi
cmp eax, ecx
push edi
mov dword [esp + 0x10], 0
je 0x10077928
cmp eax, 3
je 0x10077928
cmp eax, 2
jne 0x10077d5e
mov eax, dword [esp + 0x48]
mov ebx, dword [ebx + 4]
cmp eax, ecx
mov dword [esp + 0x10], ecx
jle 0x10077d5e
dec eax
lea ebp, [esp + 0x58]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
xor edi, edi
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x100778a1
and eax, 0xdfffffff
cmp eax, 0x80000004
mov dword [ebp + 8], eax
jne 0x10077810
mov eax, dword [ebp]
lea edx, [esp + 0x48]
push edx
push eax
call fcn.1007a600
mov ecx, dword [esp + 0x50]
add esp, 8
cmp ecx, edi
mov dword [esp + 0x34], edi
jbe 0x1007790a
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x100777e9
mov eax, 1
lea ecx, [esp + 0x34]
jmp 0x100777f6
push eax
call dword [0x10166ae8]
mov ecx, dword [esi]
add esp, 4
inc eax
mov edx, dword [ebx]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
mov eax, dword [esp + 0x48]
inc edi
add esi, 4
cmp edi, eax
jb 0x100777d8
jmp 0x1007790a
cmp eax, 0x80000005
jne 0x10077870
mov ecx, dword [ebp]
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.1007a600
mov ecx, dword [esp + 0x28]
xor esi, esi
add esp, 8
cmp ecx, esi
mov dword [esp + 0x30], esi
jbe 0x1007790a
mov edi, eax
mov eax, dword [edi]
test eax, eax
jne 0x1007784d
lea ecx, [esp + 0x30]
mov eax, 4
jmp 0x10077856
lea ecx, [eax + 4]
mov eax, dword [eax + 4]
add eax, 4
mov edx, dword [ebx]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
mov eax, dword [esp + 0x20]
inc esi
add edi, 4
cmp esi, eax
jb 0x1007783c
jmp 0x1007790a
push eax
call fcn.10079a40
mov esi, eax
add esp, 4
test esi, esi
je 0x1007790a
mov ecx, dword [ebp]
lea eax, [esp + 0x2c]
push eax
push ecx
call fcn.1007a600
mov ecx, dword [esp + 0x34]
add esp, 8
imul ecx, esi
mov edx, dword [ebx]
push ecx
push eax
jmp 0x10077905
cmp eax, 0x80000004
mov dword [esp + 0x1c], edi
jne 0x100778ce
mov eax, dword [ebp]
cmp eax, edi
jne 0x100778be
mov eax, 1
lea ecx, [esp + 0x1c]
jmp 0x10077901
push eax
call dword [0x10166ae8]
mov ecx, dword [ebp]
add esp, 4
inc eax
jmp 0x10077901
cmp eax, 0x80000005
jne 0x100778f2
mov eax, dword [ebp]
cmp eax, edi
jne 0x100778e7
mov eax, 4
lea ecx, [esp + 0x1c]
jmp 0x10077901
lea ecx, [eax + 4]
mov eax, dword [eax + 4]
add eax, 4
jmp 0x10077901
push eax
call fcn.10079a40
add esp, 4
cmp eax, edi
je 0x1007790a
mov ecx, ebp
mov edx, dword [ebx]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
mov eax, dword [esp + 0x18]
add ebp, 0xc
dec eax
mov dword [esp + 0x18], eax
jne 0x1007778d
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
mov eax, dword [ebx + 4]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x48]
cmp eax, ecx
mov dword [esp + 0x30], ecx
jle 0x10077d5e
lea esi, [esp + 0x58]
mov dword [esp + 0x34], esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10077d5e
mov eax, dword [esi + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x10077c53
and eax, 0xdfffffff
cmp eax, 0x80000004
mov dword [esi + 8], eax
jne 0x10077a8a
mov eax, dword [esi]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.1007a600
mov edx, dword [esp + 0x30]
xor ecx, ecx
add esp, 8
cmp edx, ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x24], ecx
jbe 0x10077d3e
mov esi, eax
mov dword [esp + 0x1c], esi
jmp 0x100779b3
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
test eax, eax
jne 0x100779c4
mov ebp, 1
lea esi, [esp + 0x38]
jmp 0x100779d3
push eax
call dword [0x10166ae8]
mov esi, dword [esi]
mov ebp, eax
add esp, 4
inc ebp
mov eax, dword [ebx]
xor edi, edi
cmp eax, 3
mov dword [esp + 0x18], edi
jne 0x10077a30
push ebp
call fcn.1008a3cd
mov ecx, ebp
mov edi, eax
mov edx, ecx
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
push 1
and ecx, 3
push 0
push 0
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebx + 0x130]
mov esi, dword [esp + 0x18]
lea ecx, [ebx + 0xc]
push ecx
lea ecx, [ebx + 0x2c]
push edx
push ecx
push ebp
push esi
push eax
call fcn.1007a380
add esp, 0x18
mov edi, esi
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x20]
push 0
push edx
push ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10077a4c
mov dword [esp + 0x10], eax
test edi, edi
je 0x10077a59
push edi
call fcn.1008a0c6
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10077d3e
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], edx
jb 0x100779af
jmp 0x10077d3e
cmp eax, 0x80000005
jne 0x10077b94
mov edx, dword [esi]
lea ecx, [esp + 0x2c]
push ecx
push edx
call fcn.1007a600
mov edx, dword [esp + 0x34]
xor ecx, ecx
add esp, 8
cmp edx, ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x24], ecx
jbe 0x10077d3e
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
test eax, eax
jne 0x10077ad4
lea esi, [esp + 0x3c]
mov ebp, 4
jmp 0x10077add
mov ebp, dword [eax + 4]
lea esi, [eax + 4]
add ebp, 4
mov eax, dword [ebx]
xor edi, edi
cmp eax, 3
mov dword [esp + 0x1c], edi
jne 0x10077b3a
push ebp
call fcn.1008a3cd
mov ecx, ebp
mov edi, eax
mov edx, ecx
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
push 1
and ecx, 3
push 0
push 0
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebx + 0x130]
mov esi, dword [esp + 0x1c]
lea ecx, [ebx + 0xc]
push ecx
lea ecx, [ebx + 0x2c]
push edx
push ecx
push ebp
push esi
push eax
call fcn.1007a380
add esp, 0x18
mov edi, esi
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x20]
push 0
push edx
push ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10077b56
mov dword [esp + 0x10], eax
test edi, edi
je 0x10077b63
push edi
call fcn.1008a0c6
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10077d3e
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], edx
jb 0x10077abf
jmp 0x10077d3e
push eax
call fcn.10079a40
mov edi, eax
add esp, 4
test edi, edi
je 0x10077d3e
mov edx, dword [esi]
lea ecx, [esp + 0x40]
push ecx
push edx
call fcn.1007a600
mov ebp, dword [esp + 0x48]
mov esi, eax
mov eax, dword [ebx]
imul ebp, edi
add esp, 8
xor edi, edi
cmp eax, 3
jne 0x10077c19
push ebp
call fcn.1008a3cd
mov ecx, ebp
mov dword [esp + 0x28], eax
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
add esp, 4
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
push 1
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebx + 0x130]
mov esi, dword [esp + 0x24]
lea edx, [ebx + 0xc]
push edx
lea edx, [ebx + 0x2c]
push ecx
push edx
push ebp
push esi
push eax
call fcn.1007a380
add esp, 0x18
mov edi, esi
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push 0
push eax
push ebp
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10077c35
mov dword [esp + 0x10], eax
test edi, edi
je 0x10077c42
push edi
call fcn.1008a0c6
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10077d5e
jmp 0x10077d3e
xor edi, edi
cmp eax, 0x80000004
mov dword [esp + 0x24], edi
jne 0x10077c82
mov eax, dword [esi]
cmp eax, edi
jne 0x10077c71
mov ebp, 1
lea esi, [esp + 0x24]
jmp 0x10077cb8
push eax
call dword [0x10166ae8]
mov esi, dword [esi]
mov ebp, eax
add esp, 4
inc ebp
jmp 0x10077cb8
cmp eax, 0x80000005
jne 0x10077ca5
mov esi, dword [esi]
cmp esi, edi
jne 0x10077c9a
mov ebp, 4
lea esi, [esp + 0x24]
jmp 0x10077cb8
mov ebp, dword [esi + 4]
add esi, 4
add ebp, 4
jmp 0x10077cb8
push eax
call fcn.10079a40
mov ebp, eax
add esp, 4
cmp ebp, edi
je 0x10077d3e
cmp dword [ebx], 3
jne 0x10077d0d
push ebp
call fcn.1008a3cd
mov ecx, ebp
mov edi, eax
mov edx, ecx
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
push 1
and ecx, 3
push 0
push 0
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebx + 0x130]
mov esi, dword [esp + 0x1c]
lea ecx, [ebx + 0xc]
push ecx
lea ecx, [ebx + 0x2c]
push edx
push ecx
push ebp
push esi
push eax
call fcn.1007a380
add esp, 0x18
mov edi, esi
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x20]
push 0
push edx
push ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10077d29
mov dword [esp + 0x10], eax
test edi, edi
je 0x10077d36
push edi
call fcn.1008a0c6
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10077d5e
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x48]
inc eax
add esi, 0xc
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], esi
jl 0x1007794b
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret