Function at 0x1009c4a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov eax, dword [edi + 0xc]
lea ebx, [edi + 8]
sub eax, dword [ebx]
mov dword [ebp - 0x90], edi
test eax, 0xfffffffc
jne 0x1009c4dd
mov eax, dword [edi + 0x18]
sub eax, dword [edi + 0x14]
test eax, 0xfffffffc
je 0x1009c8ca
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x1009c8e4
mov eax, dword [ecx]
push esi
call dword [eax + 0xc]
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push dword [edi + 4]
lea esi, [eax + 0x10]
mov dword [ebp - 0x8c], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
or eax, 0xffffffff
mov dword [ebp - 0x9c], edi
cmp edi, eax
je 0x1009c8b4
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x20]
cmp dword [eax - 0xc], 0
je 0x1009c5b0
push dword [0x1024e2f0]
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x88], ecx
lea ecx, [ebp - 0x88]
push eax
call fcn.10028320
push dword [ebp - 0x88]
lea eax, [ebp - 0x8c]
push str.__________________________s__________________________r_n
push eax
call fcn.1009c8f0
mov eax, dword [ebp - 0x88]
lea ecx, [ebp - 0x84]
add esp, 0xc
cmp eax, ecx
je 0x1009c596
push eax
call fcn.10213559
add esp, 4
mov esi, dword [ebp - 0x8c]
lea eax, [ebp - 0x94]
push 0
push eax
push dword [esi - 0xc]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx + 4]
xor edx, edx
mov ecx, dword [ebx]
sub eax, ecx
sar eax, 2
mov dword [ebp - 0x98], edx
test eax, eax
je 0x1009c6e3
lea ebx, [ebx]
mov ebx, dword [ecx + edx*4]
test ebx, ebx
je 0x1009c63b
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [eax - 1]
test edi, edi
jle 0x1009c63b
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or ecx, eax
jge 0x1009c616
push edi
lea ecx, [ebp - 0x8c]
call fcn.1005cf50
mov esi, dword [ebp - 0x8c]
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp edi, dword [esi - 8]
jg 0x1009c8da
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
jmp 0x1009c689
cmp dword [esi - 0xc], 0
lea edx, [esi - 0x10]
mov edi, dword [edx]
je 0x1009c689
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x1009c665
cmp dword [esi - 8], 0
jl 0x1009c8da
mov dword [esi - 0xc], 0
mov byte [esi], 0
jmp 0x1009c689
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1009c679
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x8c], esi
mov eax, dword [esi - 0xc]
mov edi, dword [ebp - 0x9c]
test eax, eax
je 0x1009c6bd
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x94]
push 0
push ecx
push eax
push esi
push edi
call ebx
push 0
lea eax, [ebp - 0x94]
push eax
push 2
push 0x102261c8
push edi
call ebx
mov eax, dword [ebp - 0x90]
mov edx, dword [ebp - 0x98]
inc edx
mov dword [ebp - 0x98], edx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sub eax, ecx
sar eax, 2
cmp edx, eax
jb 0x1009c5d0
mov ebx, dword [ebp - 0x90]
xor edx, edx
add ebx, 0x14
mov dword [ebp - 0x98], edx
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x1009c81b
mov ebx, dword [ecx + edx*4]
test ebx, ebx
je 0x1009c771
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [eax - 1]
test edi, edi
jle 0x1009c771
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or ecx, eax
jge 0x1009c74c
push edi
lea ecx, [ebp - 0x8c]
call fcn.1005cf50
mov esi, dword [ebp - 0x8c]
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp edi, dword [esi - 8]
jg 0x1009c8da
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
jmp 0x1009c7bf
cmp dword [esi - 0xc], 0
lea edx, [esi - 0x10]
mov edi, dword [edx]
je 0x1009c7bf
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x1009c79b
cmp dword [esi - 8], 0
jl 0x1009c8da
mov dword [esi - 0xc], 0
mov byte [esi], 0
jmp 0x1009c7bf
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1009c7af
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x8c], esi
mov eax, dword [esi - 0xc]
mov edi, dword [ebp - 0x9c]
test eax, eax
je 0x1009c7f3
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x94]
push 0
push ecx
push eax
push esi
push edi
call ebx
push 0
lea eax, [ebp - 0x94]
push eax
push 2
push 0x102261c8
push edi
call ebx
mov ebx, dword [ebp - 0x90]
mov edx, dword [ebp - 0x98]
add ebx, 0x14
inc edx
mov dword [ebp - 0x98], edx
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
sub eax, ecx
sar eax, 2
cmp edx, eax
jb 0x1009c706
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x20]
cmp dword [eax - 0xc], 0
je 0x1009c895
push dword [0x1024e2f0]
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x88], ecx
lea ecx, [ebp - 0x88]
push eax
call fcn.10028320
push dword [ebp - 0x88]
lea eax, [ebp - 0x8c]
push str.__________________________s__________________________r_n
push eax
call fcn.1009c8f0
mov eax, dword [ebp - 0x88]
lea ecx, [ebp - 0x84]
add esp, 0xc
cmp eax, ecx
je 0x1009c87b
push eax
call fcn.10213559
add esp, 4
mov esi, dword [ebp - 0x8c]
lea eax, [ebp - 0x94]
push 0
push eax
push dword [esi - 0xc]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x90]
lea ecx, [ecx + 8]
call fcn.1009cc40
mov ecx, ebx
call fcn.1009cc40
or eax, 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1009c8c9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.10212f74
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.100030c0
push 0x80004005
call fcn.100030c0
int3