Function at 0x10bb41b
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x82c
mov eax, dword [0x10de03c]
and dword [ebp - 0x810], 0
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi]
mov ecx, dword [ecx + 0x34]
mov ebx, dword [esi + 0x10]
mov dword [ebp - 0x818], ecx
mov ecx, dword [esi + 0x14]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x814], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x808], ecx
mov ecx, dword [ebp - 0x814]
mov ecx, dword [ecx]
mov dword [ebp - 0x80c], ecx
mov ecx, dword [ebp - 0x814]
and dword [ecx], 0
push edi
mov edi, dword [ebp + 0x10]
mov dword [eax], 1
cmp dword [edi], 0
mov dword [ebp - 0x820], esi
mov dword [ebp - 0x81c], edx
mov dword [ebp - 0x824], edi
je 0x10bb55c
mov eax, dword [ebx]
test eax, eax
je 0x10bb4e2
cmp eax, 0xffffffff
je 0x10bb4e2
test byte [ebx + 4], 1
push eax
je 0x10bb4d3
mov eax, dword [ebp - 0x818]
push dword [eax]
push dword [esi]
call fcn.010960bf
test eax, eax
je 0x10bb4d9
mov eax, dword [ebp - 0x818]
or dword [eax + 0x18], 4
mov dword [ebp - 0x810], 0xfffffe30
jmp 0x10bb4d9
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx], 0xffffffff
mov edx, dword [ebp - 0x81c]
mov eax, dword [ebp - 0x818]
mov eax, dword [eax + 0x18]
test al, 4
jne 0x10bb513
mov ecx, dword [ebp - 0x808]
test byte [ecx + 0x44], 1
je 0x10bb503
test al, 8
je 0x10bb503
test al, 0x10
je 0x10bb513
mov eax, dword [edi]
cmp eax, 0x48545058
je 0x10bb51c
cmp eax, 0x44455445
je 0x10bb539
mov ax, 0xfeb1
jmp 0x10bb988
or dword [ebx + 4], 8
mov eax, dword [edi + 8]
push 1
push eax
call dword [sym.imp.msvcrt.dll_calloc]
mov edx, dword [ebp - 0x81c]
pop ecx
pop ecx
mov dword [ebx + 0x14], eax
jmp 0x10bb53d
and dword [ebx + 4], 0xfffffff7
xor eax, eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], eax
mov ecx, dword [edi + 8]
mov dword [ebx + 0x28], ecx
mov ecx, dword [edi + 0xc]
mov dword [ebx + 0x2c], ecx
mov dword [ebp - 0x80c], eax
jmp 0x10bb898
test byte [ebx + 4], 8
je 0x10bb63c
mov ecx, dword [edi + 8]
cmp dword [ebp - 0x80c], ecx
jae 0x10bb57b
mov dword [eax], ecx
xor ax, ax
jmp 0x10bb988
mov eax, dword [ebp - 0x808]
mov eax, dword [eax + 0x40]
push dword [eax + 4]
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
and word [ebp + eax*2 - 0x802], 0
mov ecx, dword [edi + 8]
mov edi, dword [ebx + 0x14]
mov esi, dword [ebp - 0x81c]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
mov ecx, eax
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebp - 0x808]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push dword [ebx + 0x14]
mov esi, dword [eax + 0x40]
sub esp, 0x10
add esi, 8
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x804]
push eax
mov eax, dword [ebp - 0x820]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x818]
push dword [esi]
push dword [eax]
call fcn.01095f08
or dword [esi + 0x18], 8
test eax, eax
mov ecx, dword [esi + 0x18]
je 0x10bb61c
or ecx, 4
mov dword [esi + 0x18], ecx
mov dword [ebp - 0x810], 0xfffffe30
jmp 0x10bb633
mov eax, dword [ebp - 0x824]
or ecx, 0x10
mov dword [esi + 0x18], ecx
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x814]
mov dword [ecx], eax
and dword [ebx + 4], 0xfffffff7
jmp 0x10bb981
mov edi, dword [edx]
test edi, edi
jbe 0x10bb8a6
mov ecx, dword [ebx + 0x20]
or ecx, dword [ebx + 0x24]
jne 0x10bb8a6
push 4
pop ecx
cmp dword [ebp - 0x80c], ecx
jb 0x10bb671
add edi, ecx
cmp edi, dword [ebp - 0x80c]
jbe 0x10bb6cc
mov cx, word [edx]
add cx, 4
movzx ecx, cx
mov dword [eax], ecx
mov eax, dword [ebp - 0x814]
mov eax, dword [eax]
add dword [ebx + 0x20], eax
mov eax, dword [ebx + 0x20]
adc dword [ebx + 0x24], 0
cmp eax, dword [ebx + 0x28]
jne 0x10bb981
mov eax, dword [ebx + 0x24]
cmp eax, dword [ebx + 0x2c]
jne 0x10bb981
mov eax, dword [ebx]
test eax, eax
je 0x10bb981
cmp eax, 0xffffffff
je 0x10bb981
test byte [ebx + 4], 1
push eax
je 0x10bb978
mov eax, dword [ebp - 0x818]
push dword [eax]
push dword [esi]
call fcn.010960bf
jmp 0x10bb97e
cmp dword [edx], 0x400
lea esi, [edx + 4]
jbe 0x10bb6dd
mov dword [edx], 0x3fe
mov eax, dword [edx]
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x404]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x814]
mov edi, dword [ebp - 0x820]
and word [ebp - 6], 0
add eax, 4
mov dword [ecx], eax
mov edx, dword [edi]
push edi
lea ecx, [ebp - 0x404]
call fcn.010bb250
mov esi, eax
test esi, esi
mov dword [ebp - 0x808], esi
jne 0x10bb744
lea eax, [ebp - 0x404]
push eax
push 0xffffffffffffffff
push 0x10121f0
push esi
push dword [edi]
call fcn.01095952
mov ax, 0xfe0d
jmp 0x10bb988
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea ecx, [eax + eax + 2]
mov dword [ebx + 0x30], ecx
mov eax, ecx
shr ecx, 2
lea edi, [ebx + 0x34]
rep movsd dword es:[edi], dword [esi]
push ebx
mov ecx, eax
mov eax, dword [ebp - 0x818]
push 1
push dword [ebp - 0x808]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or dword [ebx + 4], 1
push dword [eax]
mov esi, dword [ebp - 0x820]
push dword [esi]
call fcn.01096035
test eax, eax
je 0x10bb85c
and dword [ebx + 4], 0xfffffffe
push 0x3a
push dword [ebp - 0x808]
xor edi, edi
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x10bb834
mov eax, dword [esi]
mov eax, dword [eax + 4]
push dword [eax + 0x54]
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
call edi
push dword [ebp - 0x808]
mov dword [ebp - 0x824], eax
call edi
mov ecx, dword [ebp - 0x824]
add ecx, eax
lea eax, [ecx + ecx + 0xa]
push 1
push eax
call dword [sym.imp.msvcrt.dll_calloc]
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x10bb7f1
or ax, 0xffff
jmp 0x10bb988
push 0x1004528
push edi
call dword [sym.imp.msvcrt.dll_wcscpy]
mov eax, dword [esi]
mov eax, dword [eax + 4]
push dword [eax + 0x54]
mov esi, dword [sym.imp.msvcrt.dll_wcscat]
push edi
call esi
push 0x1004204
push edi
call esi
push dword [ebp - 0x808]
push edi
call esi
push 0x3a
push edi
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 0x28
mov word [eax], 0x24
mov ecx, edi
jmp 0x10bb83a
mov ecx, dword [ebp - 0x808]
xor eax, eax
push eax
push 0xa000080
push 2
push eax
push eax
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
mov dword [ebx], eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebx], 0xffffffff
jne 0x10bb86b
mov dword [ebp - 0x810], 0xfffffe30
push dword [ebp - 0x808]
call dword [sym.imp.msvcrt.dll_free]
mov eax, dword [ebp - 0x814]
mov eax, dword [eax]
sub dword [ebp - 0x80c], eax
add dword [ebp - 0x81c], eax
mov esi, dword [ebp - 0x820]
mov edx, dword [ebp - 0x81c]
pop ecx
cmp word [ebp - 0x810], 0
jne 0x10bb673
mov ecx, dword [ebp - 0x80c]
test ecx, ecx
je 0x10bb673
mov eax, dword [ebx + 0x28]
mov edi, dword [ebx + 0x20]
mov dword [ebp - 0x828], eax
xor eax, eax
add ecx, edi
adc eax, dword [ebx + 0x24]
cmp eax, dword [ebx + 0x2c]
jb 0x10bb8dd
mov edi, dword [ebp - 0x828]
ja 0x10bb8d8
cmp ecx, edi
jbe 0x10bb8dd
sub edi, dword [ebx + 0x20]
jmp 0x10bb8e3
mov edi, dword [ebp - 0x80c]
test byte [ebx + 4], 1
je 0x10bb904
mov eax, dword [ebp - 0x818]
push edi
push edx
push dword [ebx]
push dword [eax]
push dword [esi]
call fcn.0109607d
mov dword [ebp - 0x82c], edi
jmp 0x10bb933
push 0
lea eax, [ebp - 0x82c]
push eax
push edi
push edx
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10bb923
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10bb933
mov eax, dword [ebp - 0x814]
mov ecx, dword [ebp - 0x82c]
add dword [eax], ecx
xor eax, eax
test eax, eax
je 0x10bb673
cmp eax, 0x70
je 0x10bb972
cmp eax, 0x27
je 0x10bb972
test byte [ebx + 4], 1
mov dword [ebp - 0x810], 0xfffffe30
jne 0x10bb673
push 0x100d780
push eax
push 0x10121d4
push 0
push dword [esi]
call fcn.01095952
jmp 0x10bb673
mov ax, 0xfe06
jmp 0x10bb988
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx], 0xffffffff
mov ax, word [ebp - 0x810]
mov ecx, dword [ebp - 4]
call fcn.01075bbb
pop edi
pop esi
pop ebx
leave
ret 0xc