Function at 0x1001a6b0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x5c
push ebx
mov ebx, dword [esp + 0x88]
push ebp
mov ebp, dword [esp + 0x88]
mov ecx, dword [ebx + 0x92c]
push esi
push edi
mov edi, dword [esp + 0x74]
test ecx, ecx
mov dword [esp + 0x14], 0
mov eax, 0xfffffffe
je 0x1001a939
xor esi, esi
cmp edi, esi
jg 0x1001a722
jl 0x1001a6f6
cmp dword [esp + 0x70], 0xfffe
ja 0x1001a722
cmp dword [esp + 0x7c], esi
jg 0x1001a722
jl 0x1001a704
cmp dword [esp + 0x78], eax
ja 0x1001a722
cmp dword [esp + 0x84], esi
jl 0x1001a939
jg 0x1001a720
cmp dword [esp + 0x80], eax
jbe 0x1001a939
xor esi, esi
mov eax, dword [ebx + 0xa8]
mov dword [esp + 0x14], 1
cmp eax, 0xffffffff
push ebx
jne 0x1001a7cc
push esi
push 0x4c
push ebp
push esi
call fcn.10020210
add esp, 0x14
test eax, eax
je 0x1001a762
mov eax, dword [ebx + 0xa0]
pop edi
neg eax
sbb eax, eax
pop esi
and al, 0xf6
pop ebp
add eax, 0x13
pop ebx
add esp, 0x5c
ret
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
mov eax, 0x2d
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x84]
mov word [esp + 0x40], ax
mov word [esp + 0x42], ax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x60], edx
mov edx, dword [ebp]
push 1
push esi
push esi
mov dword [esp + 0x40], 0x6064b50
mov dword [esp + 0x44], 0x2c
mov dword [esp + 0x48], esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x2c], 0x7064b50
push edx
jmp 0x1001a857
call fcn.10020aa0
add esp, 4
cmp edx, esi
jg 0x1001a7f2
jl 0x1001a7df
cmp eax, 0x4c
jae 0x1001a7f2
push ebx
push ebp
push esi
call fcn.10020bc0
add esp, 0xc
cmp eax, esi
jne 0x1001acd8
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x7c]
mov eax, 0x2d
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x80]
mov word [esp + 0x40], ax
mov word [esp + 0x42], ax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x60], ecx
mov ecx, dword [ebp]
push 1
push esi
push esi
mov dword [esp + 0x40], 0x6064b50
mov dword [esp + 0x44], 0x2c
mov dword [esp + 0x48], esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], eax
mov dword [esp + 0x2c], 0x7064b50
push ecx
call fcn.100348d0
add esp, 0x10
mov dword [esp + 0x28], eax
test byte [ebx + 0x4ef5], 0x80
mov dword [esp + 0x2c], edx
je 0x1001a89d
mov eax, dword [ebx + 0x4ef8]
mov ecx, dword [ebx + 0x4efc]
mov edx, dword [ebx + 0x4f08]
mov dword [esp + 0x44], eax
inc eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x30], eax
jmp 0x1001a8b9
mov eax, dword [esp + 0x70]
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x30], esi
push 0x4d
call fcn.10039ff8
add esp, 4
cmp eax, esi
mov dword [esp + 0x94], eax
je 0x1001acd3
mov ecx, 0xe
lea esi, [esp + 0x34]
mov edi, eax
push 0
rep movsd dword es:[edi], dword [esi]
lea edi, [eax + 0x38]
mov ecx, 5
lea esi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp]
lea ecx, [esp + 0x14]
push ecx
push 0x4c
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001a90c
cmp dword [esp + 0x10], 0x4c
je 0x1001a929
mov ecx, dword [esp + 0x94]
push ecx
call fcn.10039f0f
add esp, 4
mov eax, 0xa
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov eax, dword [esp + 0x94]
push eax
call fcn.10039f0f
add esp, 4
mov edx, dword [esp + 0x88]
mov eax, dword [ebx + 0xa8]
xor esi, esi
cmp eax, 0xffffffff
lea edi, [edx + 0x16]
push ebx
mov dword [esp + 0x1c], edi
jne 0x1001ab72
push esi
push edi
push ebp
push esi
call fcn.10020210
add esp, 0x14
test eax, eax
je 0x1001a980
mov eax, dword [ebx + 0xa0]
pop edi
neg eax
sbb eax, eax
pop esi
and al, 0xf6
pop ebp
add eax, 0x13
pop ebx
add esp, 0x5c
ret
mov esi, dword [esp + 0x18]
lea eax, [esi + 1]
push eax
call fcn.10039ff8
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x1001acd3
mov dword [ebp], 0x6054b50
test byte [ebx + 0x4ef5], 0x80
je 0x1001aab8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1001aa11
mov ecx, dword [ebx + 0x4ef8]
mov eax, 0xfffe
cmp ecx, eax
jbe 0x1001a9cf
lea ecx, [ebp + 4]
mov word [ecx], 0xffff
jmp 0x1001a9da
mov dx, word [ebx + 0x4ef8]
mov word [ebp + 4], dx
cmp dword [ebx + 0x4efc], eax
jbe 0x1001a9ec
lea ecx, [ebp + 6]
mov word [ecx], 0xffff
jmp 0x1001a9f7
mov dx, word [ebx + 0x4efc]
mov word [ebp + 6], dx
mov ecx, dword [ebx + 0x4f08]
cmp ecx, eax
ja 0x1001aaf7
mov dx, cx
mov word [ebp + 8], dx
jmp 0x1001aaff
mov ax, word [ebx + 0x4ef8]
mov word [ebp + 4], ax
mov cx, word [ebx + 0x4efc]
mov word [ebp + 6], cx
mov dx, word [ebx + 0x4f08]
mov word [ebp + 8], dx
mov cx, word [esp + 0x70]
mov edx, dword [esp + 0x78]
mov word [ebp + 0xa], cx
mov dword [ebp + 0xc], edx
mov eax, dword [esp + 0x80]
mov dword [ebp + 0x10], eax
mov ecx, dword [esp + 0x88]
test ecx, ecx
mov word [ebp + 0x14], cx
je 0x1001aa77
mov esi, dword [esp + 0x8c]
mov edx, ecx
lea edi, [ebp + 0x16]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x90]
lea eax, [esp + 0x10]
push 0
push eax
mov edx, dword [ecx]
push esi
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001acbd
cmp dword [esp + 0x10], esi
je 0x1001ac72
push ebp
call fcn.10039f0f
add esp, 4
mov eax, 0xa
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
lea eax, [ebp + 4]
mov dword [eax], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1001aae9
mov eax, dword [esp + 0x74]
test eax, eax
mov eax, 0xfffe
jl 0x1001aade
jg 0x1001aaf7
cmp dword [esp + 0x70], eax
ja 0x1001aaf7
mov dx, word [esp + 0x70]
mov word [ebp + 8], dx
jmp 0x1001aaff
mov ax, word [esp + 0x70]
mov word [ebp + 8], ax
jmp 0x1001aa32
lea ecx, [ebp + 8]
mov word [ecx], 0xffff
mov ecx, dword [esp + 0x74]
test ecx, ecx
jl 0x1001ab19
jg 0x1001ab0f
cmp dword [esp + 0x70], eax
jbe 0x1001ab19
lea ecx, [ebp + 0xa]
mov word [ecx], 0xffff
jmp 0x1001ab22
mov dx, word [esp + 0x70]
mov word [ebp + 0xa], dx
mov eax, dword [esp + 0x7c]
test eax, eax
jl 0x1001ab3e
jg 0x1001ab33
cmp dword [esp + 0x78], 0xfffffffe
jbe 0x1001ab3e
lea eax, [ebp + 0xc]
mov dword [eax], 0xffffffff
jmp 0x1001ab45
mov ecx, dword [esp + 0x78]
mov dword [ebp + 0xc], ecx
mov eax, dword [esp + 0x84]
test eax, eax
jl 0x1001aa42
jg 0x1001ab64
cmp dword [esp + 0x80], 0xfffffffe
jbe 0x1001aa42
lea edx, [ebp + 0x10]
mov dword [edx], 0xffffffff
jmp 0x1001aa4c
call fcn.10020aa0
add esp, 4
cmp edx, esi
jg 0x1001ab98
jl 0x1001ab84
cmp eax, edi
jae 0x1001ab98
push ebx
push ebp
push 0
call fcn.10020bc0
add esp, 0xc
test eax, eax
jne 0x1001acd8
mov esi, dword [esp + 0x18]
lea eax, [esi + 1]
push eax
call fcn.10039ff8
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x1001acd3
mov dword [ebp], 0x6054b50
test byte [ebx + 0x4ef5], 0x80
je 0x1001ac85
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1001abec
lea edx, [ebp + 4]
or ecx, 0xffffffff
or eax, 0xffffffff
mov dword [edx], ecx
mov word [edx + 4], cx
lea ecx, [ebp + 0xa]
mov dword [ebp + 0xa], eax
mov dword [ecx + 4], eax
mov word [ecx + 8], ax
jmp 0x1001ac27
mov ax, word [ebx + 0x4ef8]
mov word [ebp + 4], ax
mov cx, word [ebx + 0x4efc]
mov word [ebp + 6], cx
mov dx, word [ebx + 0x4f08]
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x80]
mov word [ebp + 8], dx
mov dx, word [esp + 0x70]
mov word [ebp + 0xa], dx
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], ecx
mov ecx, dword [esp + 0x88]
test ecx, ecx
mov word [ebp + 0x14], cx
je 0x1001ac52
mov esi, dword [esp + 0x8c]
mov edx, ecx
lea edi, [ebp + 0x16]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
mov ecx, dword [ebx + 0xa8]
lea eax, [esp + 0x10]
push 0
push eax
push esi
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001acbd
cmp dword [esp + 0x10], esi
jne 0x1001acbd
push ebp
call fcn.10039f0f
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
lea eax, [ebp + 4]
mov dword [eax], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1001acb3
lea ecx, [ebp + 8]
or eax, 0xffffffff
mov word [ecx], 0xffff
lea ecx, [ebp + 0xa]
mov dword [ebp + 0xa], eax
mov dword [ecx + 4], eax
mov word [ecx + 8], ax
jmp 0x1001ac27
mov dx, word [esp + 0x70]
jmp 0x1001ac09
push ebp
call fcn.10039f0f
add esp, 4
mov eax, 0xa
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov eax, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret