Function at 0x10046da2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x65c
mov eax, dword [0x10098428]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
cmp dword [ebx + 4], 0xffffffff
push esi
push edi
mov dword [ebp - 0x650], ebx
mov dword [ebp - 0x654], eax
je 0x10046dd6
mov edi, dword [ebx]
call fcn.100465de
mov esi, dword [ebx]
mov edi, dword [ebp + 8]
or dword [ebx + 4], 0xffffffff
cmp edi, dword [esi + 4]
jl 0x10046dee
mov eax, 0x10000
jmp 0x10047064
cmp edi, dword [esi + 0x10]
jge 0x10046e01
call fcn.10046017
jmp 0x10046e01
mov esi, dword [ebx]
call fcn.1004604d
mov eax, dword [ebx]
cmp dword [eax + 0x10], edi
jl 0x10046dfa
push edi
mov edi, dword [ebp - 0x650]
lea ebx, [ebp - 0x648]
mov ecx, edi
call fcn.1004673e
test byte [ebp - 0x43c], 0x10
je 0x10046e61
mov ecx, dword [ebp - 0x654]
movzx eax, word [ecx]
cmp ax, 0x2f
je 0x10046e46
cmp ax, 0x5c
je 0x10046e46
test ax, ax
je 0x10046e4b
cmp word [ecx + 2], 0x3a
jne 0x10046e4b
push ecx
push 0
jmp 0x10046e53
push ecx
add edi, 0x244
push edi
call fcn.10046c9e
pop ecx
pop ecx
xor eax, eax
jmp 0x10047064
mov esi, dword [ebp - 0x654]
movzx eax, word [esi]
test ax, ax
mov ebx, esi
mov ecx, esi
je 0x10046e8f
movzx eax, ax
cmp ax, 0x2f
je 0x10046e82
cmp ax, 0x5c
jne 0x10046e85
lea ebx, [ecx + 2]
inc ecx
inc ecx
movzx eax, word [ecx]
test ax, ax
jne 0x10046e76
push 0x103
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.100563c6
add esp, 0xc
cmp ebx, esi
jne 0x10046f16
and word [ebp - 0x210], 0
push ebx
lea eax, [ebp - 0x210]
push eax
lea esi, [edi + 0x244]
push esi
lea eax, [ebp - 0x418]
push str._s_s_s
push eax
call fcn.10057435
add esp, 0x14
lea eax, [ebp - 0x210]
push eax
push esi
call fcn.10046c9e
pop ecx
pop ecx
xor eax, eax
push eax
push dword [ebp - 0x43c]
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x654], eax
jne 0x10046f84
mov eax, 0x200
jmp 0x10047064
mov eax, ebx
sub eax, esi
sar eax, 1
and word [ebp + eax*2 - 0x210], 0
cmp word [ebp - 0x210], 0x2f
je 0x10046f55
cmp word [ebp - 0x210], 0x5c
je 0x10046f55
cmp word [ebp - 0x210], 0
je 0x10046eb0
cmp word [ebp - 0x20e], 0x3a
jne 0x10046eb0
push ebx
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x418]
push 0x100885b8
push eax
call fcn.10057435
lea eax, [ebp - 0x210]
push eax
push 0
call fcn.10046c9e
add esp, 0x18
jmp 0x10046ee2
push dword [edi + 0x23c]
mov ebx, dword [edi]
call fcn.1004625b
cmp dword [edi + 0x240], 0
pop ecx
mov esi, 0x4000
jne 0x10046fad
push esi
call fcn.100527d6
pop ecx
mov dword [edi + 0x240], eax
and dword [ebp - 0x650], 0
lea eax, [ebp - 0x649]
push eax
push dword [edi + 0x240]
mov eax, dword [edi]
mov ecx, esi
call fcn.100463a7
mov ebx, eax
cmp ebx, 0xffffff96
pop ecx
pop ecx
je 0x10047012
test ebx, ebx
jl 0x10047006
jle 0x10046ff9
push 0
lea eax, [ebp - 0x658]
push eax
push ebx
push dword [edi + 0x240]
push dword [ebp - 0x654]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1004701e
cmp byte [ebp - 0x649], 0
jne 0x1004702a
test ebx, ebx
jne 0x10046fb4
mov dword [ebp - 0x650], 0x5000000
jmp 0x1004704b
mov dword [ebp - 0x650], 0x1000
jmp 0x1004704b
mov dword [ebp - 0x650], 0x400
jmp 0x1004704b
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x430]
push eax
push dword [ebp - 0x654]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [ebp - 0x654]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
call fcn.100465de
mov eax, dword [ebp - 0x650]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10053191
leave
ret 8