Function at 0x10011830
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
xor ecx, ecx
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
mov esi, dword [esp + 0x34]
push edi
mov edi, dword [esp + 0x2c]
cmp dword [esi + 0x4e74], ecx
je 0x1001189d
mov ebx, dword [esp + 0x28]
mov eax, edi
or eax, ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebp
je 0x1001189d
push esi
call fcn.100114d0
movsx ecx, byte [ebx]
push esi
push ecx
mov dword [esp + 0x38], eax
call fcn.100114f0
mov dl, byte [esp + 0x38]
mov al, byte [ebx]
mov ecx, dword [esp + 0x24]
xor al, dl
mov byte [ebx], al
mov eax, dword [esp + 0x20]
add esp, 0xc
inc ebx
add eax, 0xffffffff
adc ecx, 0xffffffff
mov dword [esp + 0x14], eax
or eax, ecx
mov dword [esp + 0x18], ecx
jne 0x1001185f
xor ecx, ecx
mov eax, dword [esi + 0x8e6]
mov ebx, 3
cmp eax, ecx
je 0x10011952
cmp ebp, ecx
jl 0x10011952
jg 0x100118c2
cmp edi, ecx
jbe 0x10011952
mov ecx, dword [esi + 0x8fe]
mov edx, dword [esi + 0x8f6]
lea eax, [esp + 0x10]
mov dword [esp + 0x38], edi
push eax
mov eax, dword [esi + 0x8f2]
push ecx
mov ecx, 0x20
mov dword [esp + 0x18], ebx
call fcn.10035f30
mov edx, dword [esi + 0x8f2]
push eax
mov eax, dword [esi + 0x8ea]
push edx
mov edx, dword [esi + 0x8ee]
mov ecx, 0x20
call fcn.10035f30
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esi + 0x8ea]
lea ecx, [esp + 0x4c]
push eax
push ecx
push edx
push 2
call dword [esi + 0x8fa]
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x10011947
cmp eax, 2
jg 0x10011947
mov dword [esi + 0x9a], 1
pop edi
pop esi
xor eax, eax
pop ebp
xor edx, edx
pop ebx
add esp, 0x14
ret
push esi
call fcn.100046c0
add esp, 4
xor ecx, ecx
cmp dword [esi + 0x8de], ecx
je 0x10011a22
mov ecx, dword [esi + 0x8fe]
mov edx, dword [esi + 0x8f6]
lea eax, [esp + 0x10]
mov dword [esp + 0x38], edi
push eax
mov eax, dword [esi + 0x8f2]
push ecx
mov ecx, 0x20
mov dword [esp + 0x18], ebx
call fcn.10035f30
mov edx, dword [esi + 0x8f2]
push eax
mov eax, dword [esi + 0x8ea]
push edx
mov edx, dword [esi + 0x8ee]
mov ecx, 0x20
call fcn.10035f30
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esi + 0x8ea]
lea ecx, [esp + 0x4c]
push eax
push ecx
push edx
push 1
call dword [esi + 0x8fa]
mov eax, dword [esp + 0x10]
cmp eax, ebx
ja case.0x100119cc.0
jmp dword [eax*4 + 0x10011dc4]
mov eax, dword [esp + 0x38]
cmp eax, edi
jne 0x10011d95
mov ecx, dword [esi + 0x8f2]
push esi
add ecx, eax
mov dword [esi + 0x8f2], ecx
mov eax, dword [esi + 0x8f6]
adc eax, 0
mov dword [esi + 0x8f6], eax
call fcn.100046c0
mov eax, dword [esp + 0x3c]
add esp, 4
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov dword [esi + 0x9a], 1
jmp case.0x100119cc.0
mov eax, dword [esp + 0x34]
cmp eax, ecx
je 0x10011dac
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x10011dac
test byte [esi + 0x4ee1], 0x80
je 0x10011d70
mov eax, dword [esi + 0xa2]
mov dword [esp + 0x14], ecx
cmp eax, 0xffffffff
mov dword [esp + 0x18], ecx
jne 0x10011c26
mov ecx, dword [esi + 0x4e7c]
mov eax, dword [esp + 0x28]
push esi
push ecx
mov dword [esp + 0x34], eax
mov ebx, ebp
call fcn.1000aad0
add esp, 8
cmp edx, ebp
jl 0x10011ad6
jg 0x10011a81
cmp eax, edi
jb 0x10011ad6
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x38]
push 0
push edx
mov edx, dword [ecx]
push edi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10011c0d
cmp dword [esp + 0x38], edi
jne 0x10011c0d
mov ecx, dword [esi + 0x4efe]
mov dword [esp + 0x14], edi
add ecx, edi
mov dword [esp + 0x18], ebp
mov dword [esi + 0x4efe], ecx
mov eax, dword [esi + 0x4f02]
adc eax, ebp
mov dword [esi + 0x4f02], eax
jmp 0x10011c0d
test ebp, ebp
jl 0x10011ba1
jg 0x10011aec
cmp edi, 0x200
jb 0x10011ba1
mov ebp, dword [esp + 0x34]
push esi
push 0
push 0x200
push ebp
push 0
call fcn.1000bdd0
add esp, 0x14
test eax, eax
jne 0x10011b7c
mov ecx, dword [esp + 0x2c]
mov edx, dword [ebp]
push eax
lea eax, [esp + 0x3c]
push eax
push 0x200
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10011b7c
mov ecx, dword [esp + 0x38]
mov eax, 0x200
cmp ecx, eax
jne 0x10011b7c
mov ecx, dword [esi + 0x4efe]
add ecx, eax
mov dword [esi + 0x4efe], ecx
mov edx, dword [esi + 0x4f02]
mov ecx, 0
adc edx, ecx
add edi, 0xfffffe00
mov dword [esi + 0x4f02], edx
mov edx, dword [esp + 0x14]
adc ebx, 0xffffffff
add edx, eax
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
adc edx, ecx
mov ecx, dword [esp + 0x2c]
add ecx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], ecx
jmp 0x10011b80
xor edi, edi
xor ebx, ebx
push esi
call fcn.100046c0
add esp, 4
test ebx, ebx
jg 0x10011aec
jl 0x10011ba5
cmp edi, 0x200
jae 0x10011aec
jmp 0x10011ba5
mov ebp, dword [esp + 0x34]
mov eax, edi
or eax, ebx
je 0x10011c0d
push esi
push ebx
push edi
push ebp
push 0
call fcn.1000bdd0
add esp, 0x14
test eax, eax
jne 0x10011c0d
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
push eax
mov eax, dword [ebp]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10011c0d
cmp dword [esp + 0x38], edi
jne 0x10011c0d
mov ebp, dword [esi + 0x4efe]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add ebp, edi
mov dword [esi + 0x4efe], ebp
mov edx, dword [esi + 0x4f02]
adc edx, ebx
add ecx, edi
adc eax, ebx
mov dword [esi + 0x4f02], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
push esi
call fcn.100046c0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x28]
mov ebx, edi
test ebp, ebp
mov dword [esp + 0x2c], ecx
jl 0x10011d60
jg 0x10011c42
test edi, edi
jbe 0x10011d60
push esi
call fcn.1000c660
add esp, 4
cmp edx, ebp
mov edi, eax
mov dword [esp + 0x20], edx
jl 0x10011cbc
jg 0x10011c5b
cmp edi, ebx
jb 0x10011cbc
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 0xa2]
lea edx, [esp + 0x38]
push 0
push edx
push ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10011d45
cmp dword [esp + 0x38], ebx
jne 0x10011d45
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ecx, dword [esi + 0x4efe]
add edi, ebx
adc edx, ebp
add ecx, ebx
mov dword [esi + 0x4efe], ecx
mov eax, dword [esi + 0x4f02]
adc eax, ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edx
mov dword [esi + 0x4f02], eax
jmp 0x10011d41
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 0xa2]
lea edx, [esp + 0x38]
push 0
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10011d2b
mov eax, dword [esp + 0x38]
cdq
cmp eax, edi
jne 0x10011d2b
mov eax, dword [esp + 0x20]
cmp edx, eax
jne 0x10011d2b
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
sub ebx, edi
sbb ebp, eax
add ecx, edi
adc edx, eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x18], edx
mov edx, dword [esi + 0x4efe]
add ecx, edi
add edx, edi
mov dword [esp + 0x2c], ecx
mov dword [esi + 0x4efe], edx
mov ecx, dword [esi + 0x4f02]
adc ecx, eax
mov dword [esi + 0x4f02], ecx
jmp 0x10011d2f
xor ebx, ebx
xor ebp, ebp
mov edx, dword [esp + 0x34]
push esi
push edx
call fcn.1000c760
add esp, 8
test eax, eax
je 0x10011d45
xor ebx, ebx
xor ebp, ebp
push esi
call fcn.100046c0
add esp, 4
test ebp, ebp
jg 0x10011c42
jl 0x10011d60
test ebx, ebx
ja 0x10011c42
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov edx, dword [esp + 0x28]
push ecx
lea ecx, [esp + 0x3c]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je case.0x100119cc.0
cmp dword [esp + 0x38], edi
je 0x10011d95
mov dword [esp + 0x38], 0
push esi
call fcn.100046c0
mov eax, dword [esp + 0x3c]
add esp, 4
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push esi
call fcn.100046c0
add esp, 4
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret