Function at 0x10098f80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x102519c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov dword [ebp - 0x90], 0
mov eax, dword [edi + 0xc]
lea ebx, [edi + 8]
sub eax, dword [ebx]
mov dword [ebp - 0x94], edi
test eax, 0xfffffffc
jne 0x10098fc7
mov eax, dword [edi + 0x18]
sub eax, dword [edi + 0x14]
test eax, 0xfffffffc
je 0x100993bb
push esi
call fcn.10002d70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 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 - 0xa0], edi
cmp edi, eax
je 0x100993a5
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x20]
cmp dword [eax - 0xc], 0
je 0x100990b5
cmp dword [0x1023fe04], 0
je 0x10099055
push dword [0x1023fe00]
lea ecx, [ebp - 0x88]
push eax
call fcn.10098d30
mov ecx, 1
mov dword [ebp - 0x90], ecx
mov eax, dword [eax]
jmp 0x1009905a
mov eax, 0x10202a60
push eax
lea eax, [ebp - 0x8c]
push str.__________________________s__________________________r_n
push eax
call fcn.100993d0
mov eax, dword [ebp - 0x90]
add esp, 0xc
test al, 1
je 0x1009909b
and eax, 0xfffffffe
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x88]
cmp eax, ecx
je 0x1009909b
push eax
call sub.msvcrt.dll_free
add esp, 4
mov esi, dword [ebp - 0x8c]
lea eax, [ebp - 0x98]
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 - 0x9c], edx
test eax, eax
je 0x100991d0
nop
mov ebx, dword [ecx + edx*4]
test ebx, ebx
je 0x10099132
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 0x10099132
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or ecx, eax
jge 0x10099116
push edi
lea ecx, [ebp - 0x8c]
call fcn.1005ce30
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]
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
jmp 0x10099176
cmp dword [esi - 0xc], 0
lea edx, [esi - 0x10]
mov edi, dword [edx]
je 0x10099176
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x10099152
mov dword [esi - 0xc], 0
mov byte [esi], 0
jmp 0x10099176
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x10099166
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 - 0xa0]
test eax, eax
je 0x100991aa
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x98]
push 0
push ecx
push eax
push esi
push edi
call ebx
push 0
lea eax, [ebp - 0x98]
push eax
push 2
push 0x1020e594
push edi
call ebx
mov eax, dword [ebp - 0x94]
mov edx, dword [ebp - 0x9c]
inc edx
mov dword [ebp - 0x9c], edx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sub eax, ecx
sar eax, 2
cmp edx, eax
jb 0x100990d0
mov ebx, dword [ebp - 0x94]
xor edx, edx
add ebx, 0x14
mov dword [ebp - 0x9c], edx
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x100992f5
mov ebx, dword [ecx + edx*4]
test ebx, ebx
je 0x10099255
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 0x10099255
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or ecx, eax
jge 0x10099239
push edi
lea ecx, [ebp - 0x8c]
call fcn.1005ce30
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]
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
jmp 0x10099299
cmp dword [esi - 0xc], 0
lea edx, [esi - 0x10]
mov edi, dword [edx]
je 0x10099299
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x10099275
mov dword [esi - 0xc], 0
mov byte [esi], 0
jmp 0x10099299
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x10099289
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 - 0xa0]
test eax, eax
je 0x100992cd
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x98]
push 0
push ecx
push eax
push esi
push edi
call ebx
push 0
lea eax, [ebp - 0x98]
push eax
push 2
push 0x1020e594
push edi
call ebx
mov ebx, dword [ebp - 0x94]
mov edx, dword [ebp - 0x9c]
add ebx, 0x14
inc edx
mov dword [ebp - 0x9c], edx
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
sub eax, ecx
sar eax, 2
cmp edx, eax
jb 0x100991f3
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x20]
cmp dword [eax - 0xc], 0
je 0x10099386
cmp dword [0x1023fe04], 0
je 0x1009932e
push dword [0x1023fe00]
or dword [ebp - 0x90], 2
lea ecx, [ebp - 0x88]
push eax
call fcn.10098d30
mov eax, dword [eax]
jmp 0x10099333
mov eax, 0x10202a60
push eax
lea eax, [ebp - 0x8c]
push str.__________________________s__________________________r_n
push eax
call fcn.100993d0
mov ecx, dword [ebp - 0x90]
add esp, 0xc
test cl, 2
je 0x1009936c
mov eax, dword [ebp - 0x88]
lea ecx, [ebp - 0x84]
cmp eax, ecx
je 0x1009936c
push eax
call sub.msvcrt.dll_free
add esp, 4
mov esi, dword [ebp - 0x8c]
lea eax, [ebp - 0x98]
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 - 0x94]
lea ecx, [ecx + 8]
call fcn.100996c0
mov ecx, ebx
call fcn.100996c0
or eax, 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100993ba
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.101f99c6
mov esp, ebp
pop ebp
ret