Function at 0x10bb287
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 0x10bb3c8
mov eax, dword [ebx]
test eax, eax
je 0x10bb34e
cmp eax, 0xffffffff
je 0x10bb34e
test byte [ebx + 4], 1
push eax
je 0x10bb33f
mov eax, dword [ebp - 0x818]
push dword [eax]
push dword [esi]
call fcn.01095f31
test eax, eax
je 0x10bb345
mov eax, dword [ebp - 0x818]
or dword [eax + 0x18], 4
mov dword [ebp - 0x810], 0xfffffe30
jmp 0x10bb345
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 0x10bb37f
mov ecx, dword [ebp - 0x808]
test byte [ecx + 0x44], 1
je 0x10bb36f
test al, 8
je 0x10bb36f
test al, 0x10
je 0x10bb37f
mov eax, dword [edi]
cmp eax, 0x48545058
je 0x10bb388
cmp eax, 0x44455445
je 0x10bb3a5
mov ax, 0xfeb1
jmp 0x10bb7f4
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 0x10bb3a9
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 0x10bb704
test byte [ebx + 4], 8
je 0x10bb4a8
mov ecx, dword [edi + 8]
cmp dword [ebp - 0x80c], ecx
jae 0x10bb3e7
mov dword [eax], ecx
xor ax, ax
jmp 0x10bb7f4
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.01095d7a
or dword [esi + 0x18], 8
test eax, eax
mov ecx, dword [esi + 0x18]
je 0x10bb488
or ecx, 4
mov dword [esi + 0x18], ecx
mov dword [ebp - 0x810], 0xfffffe30
jmp 0x10bb49f
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 0x10bb7ed
mov edi, dword [edx]
test edi, edi
jbe 0x10bb712
mov ecx, dword [ebx + 0x20]
or ecx, dword [ebx + 0x24]
jne 0x10bb712
push 4
pop ecx
cmp dword [ebp - 0x80c], ecx
jb 0x10bb4dd
add edi, ecx
cmp edi, dword [ebp - 0x80c]
jbe 0x10bb538
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 0x10bb7ed
mov eax, dword [ebx + 0x24]
cmp eax, dword [ebx + 0x2c]
jne 0x10bb7ed
mov eax, dword [ebx]
test eax, eax
je 0x10bb7ed
cmp eax, 0xffffffff
je 0x10bb7ed
test byte [ebx + 4], 1
push eax
je 0x10bb7e4
mov eax, dword [ebp - 0x818]
push dword [eax]
push dword [esi]
call fcn.01095f31
jmp 0x10bb7ea
cmp dword [edx], 0x400
lea esi, [edx + 4]
jbe 0x10bb549
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.010bb0bc
mov esi, eax
test esi, esi
mov dword [ebp - 0x808], esi
jne 0x10bb5b0
lea eax, [ebp - 0x404]
push eax
push 0xffffffffffffffff
push 0x10121d8
push esi
push dword [edi]
call fcn.010957c4
mov ax, 0xfe0d
jmp 0x10bb7f4
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.01095ea7
test eax, eax
je 0x10bb6c8
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 0x10bb6a0
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 0x10bb65d
or ax, 0xffff
jmp 0x10bb7f4
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 0x10bb6a6
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 0x10bb6d7
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 0x10bb4df
mov ecx, dword [ebp - 0x80c]
test ecx, ecx
je 0x10bb4df
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 0x10bb749
mov edi, dword [ebp - 0x828]
ja 0x10bb744
cmp ecx, edi
jbe 0x10bb749
sub edi, dword [ebx + 0x20]
jmp 0x10bb74f
mov edi, dword [ebp - 0x80c]
test byte [ebx + 4], 1
je 0x10bb770
mov eax, dword [ebp - 0x818]
push edi
push edx
push dword [ebx]
push dword [eax]
push dword [esi]
call fcn.01095eef
mov dword [ebp - 0x82c], edi
jmp 0x10bb79f
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 0x10bb78f
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10bb79f
mov eax, dword [ebp - 0x814]
mov ecx, dword [ebp - 0x82c]
add dword [eax], ecx
xor eax, eax
test eax, eax
je 0x10bb4df
cmp eax, 0x70
je 0x10bb7de
cmp eax, 0x27
je 0x10bb7de
test byte [ebx + 4], 1
mov dword [ebp - 0x810], 0xfffffe30
jne 0x10bb4df
push 0x100d768
push eax
push 0x10121bc
push 0
push dword [esi]
call fcn.010957c4
jmp 0x10bb4df
mov ax, 0xfe06
jmp 0x10bb7f4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx], 0xffffffff
mov ax, word [ebp - 0x810]
mov ecx, dword [ebp - 4]
call fcn.01075aef
pop edi
pop esi
pop ebx
leave
ret 0xc