Function at 0x46b98c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
sub esp, 0x28
mov esi, eax
mov ebx, ecx
mov edi, edx
test esi, esi
je 0x46bf82
movzx ecx, byte [esi + 0x194]
and ecx, 0x80
shr ecx, 7
mov dword [ebp - 0x10], ecx
movzx ecx, byte [esi + 0x195]
mov eax, ecx
and eax, 1
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x15c]
mov dword [ebp - 0x18], eax
xor eax, eax
mov edx, dword [esi + 0xfc]
mov dword [esi + 0xe0], eax
mov dword [esi + 0xe4], eax
mov dword [esi + 0x108], eax
test ebx, ebx
jne 0x46bb4a
test byte [esi + 0x191], 4
jne 0x46baad
mov eax, dword [esi + 0x90]
test eax, eax
je 0x46ba0d
cmp byte [eax + 0x1e], 0
jne 0x46ba1f
mov ecx, 1
test esi, esi
jne 0x46be67
jmp 0x46be75
push 0
mov ecx, dword [esi + 0x5c]
lea eax, [ebp - 0x20]
sub ecx, dword [esi + 0x58]
push eax
mov dword [ebp - 0x34], ecx
push ecx
push dword [esi + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
test ecx, ecx
mov edx, dword [esi + 0x110]
jne 0x46ba4a
mov ecx, 0xffffffff
push edx
push 0x20
mov ebx, dword [esi + 0x48]
add edx, ebx
push ebx
and byte [esi + 0x191], 0xfb
mov dword [esi + 0x50], 0
mov dword [esi + 0x54], edx
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x5c], ebx
mov dword [ebp - 0x30], ecx
call fcn.004a08c0
mov ecx, dword [ebp - 0x30]
add esp, 0xc
mov eax, dword [ebp - 0x34]
cdq
add eax, dword [esi + 0xd8]
mov dword [esi + 0xd8], eax
adc edx, dword [esi + 0xdc]
mov dword [esi + 0xdc], edx
test esi, esi
mov dword [esi + 0xd0], eax
mov dword [esi + 0xd4], edx
jne 0x46be67
jmp 0x46be75
push 0
mov edi, dword [esi + 0x50]
lea eax, [ebp - 0x20]
sub edi, dword [esi + 0x48]
push eax
push edi
push dword [esi + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
mov edx, dword [esi + 0x48]
mov eax, edi
mov ebx, dword [esi + 0x110]
test ecx, ecx
mov dword [esi + 0x4c], edx
jne 0x46badd
mov ecx, 0xffffffff
add ebx, edx
cdq
mov eax, edx
mov edx, dword [esi + 0xd8]
add edx, edi
mov dword [esi + 0x54], ebx
mov ebx, dword [esi + 0xdc]
adc ebx, eax
and byte [esi + 0x191], 0xfb
mov dword [esi + 0x50], 0
mov dword [esi + 0xd8], edx
mov dword [esi + 0xdc], ebx
test byte [esi + 0x195], 0x20
je 0x46bb31
mov dword [esi + 0xd0], edx
test esi, esi
mov dword [esi + 0xd4], ebx
jne 0x46be67
jmp 0x46be75
add dword [esi + 0xd0], edi
adc dword [esi + 0xd4], eax
test esi, esi
jne 0x46be67
jmp 0x46be75
mov eax, dword [esi + 0x50]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x46bc03
cmp edi, dword [ebp - 0x1c]
je 0x46bc03
mov eax, dword [esi + 0x48]
mov dword [ebp - 0x34], eax
sub dword [ebp - 0x1c], eax
je 0x46bc03
push 0
lea ecx, [ebp - 0x20]
push ecx
push dword [ebp - 0x1c]
push dword [ebp - 0x34]
mov dword [ebp - 0x28], edx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x28]
test eax, eax
jne 0x46bb9f
mov ecx, 0xffffffff
test esi, esi
jne 0x46be67
jmp 0x46be75
mov eax, dword [ebp - 0x1c]
mov ecx, dword [esi + 0xd8]
mov dword [ebp - 0x28], edx
add ecx, eax
cdq
mov dword [ebp - 0x24], ebx
mov ebx, dword [esi + 0xdc]
mov dword [ebp - 0x34], ecx
adc ebx, edx
mov dword [esi + 0xd8], ecx
movzx ecx, byte [esi + 0x195]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x30], ebx
mov dword [esi + 0xdc], ebx
mov edx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x24]
test cl, 0x20
je 0x46bbf4
mov eax, dword [ebp - 0x34]
mov dword [esi + 0xd0], eax
mov eax, dword [ebp - 0x30]
mov dword [esi + 0xd4], eax
jmp 0x46bc03
add dword [esi + 0xd0], eax
mov eax, dword [ebp - 0x2c]
adc dword [esi + 0xd4], eax
cmp dword [0x508060], 0
je 0x46bc62
cmp dword [ebp - 0x18], 0
je 0x46bb8d
cmp dword [ebp - 0x10], 0
je 0x46bc53
cmp dword [ebp - 0x18], 0xfffffffa
je 0x46be36
mov eax, dword [ebp - 0x18]
lea eax, [eax - 1]
cmp eax, 1
jbe 0x46be20
cmp dword [ebp - 0x14], 0
je 0x46bc62
push ecx
mov dword [ebp - 0x28], edx
call fcn.004a89d0
mov edx, dword [ebp - 0x28]
add esp, 4
movzx ecx, byte [esi + 0x195]
jmp 0x46bc62
mov eax, dword [ebp - 0x18]
lea eax, [eax - 1]
cmp eax, 1
jbe 0x46be20
test cl, 0x40
jne 0x46bc6f
mov ecx, dword [esi + 0x50]
mov dword [ebp - 0x2c], ecx
jmp 0x46bcb3
test byte [esi + 0x193], 1
jne 0x46bc67
mov eax, dword [esi + 0x48]
mov ecx, dword [esi + 0x50]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ecx
cmp edi, eax
je 0x46bc8d
cmp edi, dword [ebp - 0x2c]
jne 0x46bcc2
mov eax, dword [esi + 0x110]
mov ecx, dword [esi + 0x4c]
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0x30]
add edx, dword [esi + 0x104]
lea ecx, [ecx + eax*2]
mov dword [ebp - 0x34], eax
cmp edx, ecx
mov edx, dword [ebp - 0x28]
ja 0x46bdf1
cmp edi, dword [ebp - 0x2c]
jne 0x46bcc2
mov edi, dword [esi + 0x48]
mov ecx, dword [ebp - 0x2c]
sub ecx, edi
add ebx, ecx
mov ecx, dword [esi + 0x158]
test ecx, ecx
je 0x46bcd5
cmp ebx, ecx
jbe 0x46bd3d
mov dword [ebp - 0x28], ebx
jmp 0x46bce5
cmp ebx, 0x20000
jbe 0x46bd3d
mov dword [ebp - 0x28], ebx
mov ecx, 0x20000
mov dword [ebp - 0x24], ebx
mov eax, edi
mov dword [ebp - 0x30], edi
mov ebx, edx
mov dword [ebp - 0x2c], esi
mov esi, ecx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp ebx, eax
je 0x46beeb
push 0
lea eax, [ebp - 0x20]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
cmp ecx, 1
je 0x46be8a
cmp dword [ebp - 0x28], 0
je 0x46be7f
cmp ecx, 1
jne 0x46be7f
mov eax, dword [ebp - 0x20]
test eax, eax
ja 0x46bcf4
jmp 0x46bed5
mov dword [ebp - 0x28], edx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, dword [ebp - 0x28]
cmp edx, eax
je 0x46bf47
push 0
lea ecx, [ebp - 0x20]
push ecx
push ebx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
test ecx, ecx
jne 0x46bd77
cmp dword [ebp - 0x18], 1
je 0x46bf31
mov ecx, 0xffffffff
test esi, esi
je 0x46be65
mov eax, ebx
cdq
mov edi, dword [esi + 0x48]
mov eax, edx
mov edx, dword [esi + 0xd8]
add edi, dword [esi + 0x110]
add edx, ebx
mov dword [esi + 0x54], edi
mov edi, dword [esi + 0xdc]
adc edi, eax
and byte [esi + 0x191], 0xfb
mov dword [esi + 0x50], 0
mov dword [esi + 0xd8], edx
mov dword [esi + 0xdc], edi
test byte [esi + 0x195], 0x20
je 0x46bddc
mov dword [esi + 0xd0], edx
test esi, esi
mov dword [esi + 0xd4], edi
jne 0x46be67
jmp 0x46be75
add dword [esi + 0xd0], ebx
adc dword [esi + 0xd4], eax
test esi, esi
jne 0x46be67
jmp 0x46be75
mov eax, ebx
add edi, ebx
cdq
add dword [esi + 0xd0], ebx
mov ecx, dword [ebp - 0x34]
adc dword [esi + 0xd4], edx
or byte [esi + 0x191], 4
add dword [esi + 0x54], ecx
mov ecx, 1
mov dword [esi + 0x50], edi
test esi, esi
mov dword [esi + 0x4c], edi
jne 0x46be67
jmp 0x46be75
call fcn.004a89f0
mov edx, eax
cmp dword [0x508060], 0
je 0x46be4b
cmp dword [ebp - 0x10], 0
je 0x46be4b
cmp dword [ebp - 0x14], 0
je 0x46be4b
push edx
mov dword [ebp - 0x28], edx
call fcn.004a89d0
mov edx, dword [ebp - 0x28]
add esp, 4
push 0
push edx
push ebx
push edi
call fcn.004a89d0
mov ecx, eax
add esp, 0x10
cmp ecx, ebx
je 0x46be63
mov ecx, 0xffffffff
test esi, esi
je 0x46be75
xor edx, edx
mov dword [esi + 0xc0], edx
mov dword [esi + 0xc4], edx
mov eax, ecx
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x2c]
jmp 0x46bd64
mov eax, dword [ebp - 0x20]
sub dword [ebp - 0x28], eax
add edi, eax
cmp dword [ebp - 0x2c], 0
je 0x46bec0
mov edx, dword [ebp - 0x2c]
mov edx, dword [edx + 0x158]
mov dword [ebp - 0x34], edx
test edx, edx
je 0x46bec0
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x34]
ja 0x46beb2
mov esi, edx
test edx, edx
je 0x46bee0
test eax, eax
ja 0x46bcf4
jmp 0x46bee0
mov edx, dword [ebp - 0x28]
cmp edx, 0x20000
ja 0x46becd
mov esi, edx
test edx, edx
jne 0x46bd34
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x2c]
jmp 0x46bd77
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x2c]
jmp 0x46bd7f
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x46bd04
push esi
push edi
push 1
call fcn.004ae98e
add esp, 0xc
cmp eax, 0xffffffff
je 0x46bf19
mov dword [ebp - 0x20], eax
mov ecx, 1
jmp 0x46be8d
push 0
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x30]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x46bd13
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x46bd72
xor ecx, ecx
jmp 0x46bd77
mov dword [ebp - 0x28], edx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov edx, dword [ebp - 0x28]
cmp eax, 2
jne 0x46bd53
push ebx
push edi
push 1
mov dword [ebp - 0x28], edx
call fcn.004ae98e
mov edx, dword [ebp - 0x28]
add esp, 0xc
cmp eax, 0xffffffff
je 0x46bd53
mov ecx, 1
jmp 0x46bd77
cmp dword [0x508060], 0
jne 0x46bfcb
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, eax
mov ecx, dword [0x508060]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], ecx
test ebx, ebx
je 0x46ba0d
cmp dword [ebp - 0x10], 0
jne 0x46be20
mov dword [ebp - 0x18], 1
cmp ebx, 0x20000
jbe 0x46bd3d
jmp 0x46bcdd
call fcn.004a89f0
jmp 0x46bf93